Class: PostProxy::BulkComment
Overview
A comment from Comments#list_all. Flat: replies are their own entries
linked to their parent by parent_external_id rather than nested under
replies.
Instance Attribute Summary collapse
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#author_avatar_url ⇒ Object
Returns the value of attribute author_avatar_url.
-
#author_external_id ⇒ Object
Returns the value of attribute author_external_id.
-
#author_username ⇒ Object
Returns the value of attribute author_username.
-
#body ⇒ Object
Returns the value of attribute body.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_hidden ⇒ Object
Returns the value of attribute is_hidden.
-
#like_count ⇒ Object
Returns the value of attribute like_count.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#parent_external_id ⇒ Object
Returns the value of attribute parent_external_id.
-
#permalink ⇒ Object
Returns the value of attribute permalink.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#platform_data ⇒ Object
Returns the value of attribute platform_data.
-
#post_id ⇒ Object
Returns the value of attribute post_id.
-
#posted_at ⇒ Object
Returns the value of attribute posted_at.
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ BulkComment
constructor
A new instance of BulkComment.
Methods inherited from Model
Constructor Details
#initialize(**attrs) ⇒ BulkComment
Returns a new instance of BulkComment.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/postproxy/types.rb', line 521 def initialize(**attrs) @external_id = nil @author_username = nil @author_avatar_url = nil @author_external_id = nil @metadata = nil @parent_external_id = nil @like_count = 0 @is_hidden = false @permalink = nil @platform_data = nil @attachments = [] @posted_at = nil super @posted_at = parse_time(@posted_at) @created_at = parse_time(@created_at) @attachments = (@attachments || []).map do |a| a.is_a?(Attachment) ? a : Attachment.new(**a.transform_keys(&:to_sym)) end end |
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def @attachments end |
#author_avatar_url ⇒ Object
Returns the value of attribute author_avatar_url.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def @author_avatar_url end |
#author_external_id ⇒ Object
Returns the value of attribute author_external_id.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def @author_external_id end |
#author_username ⇒ Object
Returns the value of attribute author_username.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def @author_username end |
#body ⇒ Object
Returns the value of attribute body.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def body @body end |
#created_at ⇒ Object
Returns the value of attribute created_at.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def created_at @created_at end |
#external_id ⇒ Object
Returns the value of attribute external_id.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def external_id @external_id end |
#id ⇒ Object
Returns the value of attribute id.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def id @id end |
#is_hidden ⇒ Object
Returns the value of attribute is_hidden.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def is_hidden @is_hidden end |
#like_count ⇒ Object
Returns the value of attribute like_count.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def like_count @like_count end |
#metadata ⇒ Object
Returns the value of attribute metadata.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def @metadata end |
#parent_external_id ⇒ Object
Returns the value of attribute parent_external_id.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def parent_external_id @parent_external_id end |
#permalink ⇒ Object
Returns the value of attribute permalink.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def permalink @permalink end |
#platform ⇒ Object
Returns the value of attribute platform.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def platform @platform end |
#platform_data ⇒ Object
Returns the value of attribute platform_data.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def platform_data @platform_data end |
#post_id ⇒ Object
Returns the value of attribute post_id.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def post_id @post_id end |
#posted_at ⇒ Object
Returns the value of attribute posted_at.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def posted_at @posted_at end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def profile_id @profile_id end |
#status ⇒ Object
Returns the value of attribute status.
515 516 517 |
# File 'lib/postproxy/types.rb', line 515 def status @status end |