Class: PostProxy::BulkComment

Inherits:
Model
  • Object
show all
Defined in:
lib/postproxy/types.rb

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

Instance Method Summary collapse

Methods inherited from Model

#to_h

Constructor Details

#initialize(**attrs) ⇒ BulkComment

Returns a new instance of BulkComment.



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
# File 'lib/postproxy/types.rb', line 622

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

#attachmentsObject

Returns the value of attribute attachments.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def attachments
  @attachments
end

#author_avatar_urlObject

Returns the value of attribute author_avatar_url.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def author_avatar_url
  @author_avatar_url
end

#author_external_idObject

Returns the value of attribute author_external_id.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def author_external_id
  @author_external_id
end

#author_usernameObject

Returns the value of attribute author_username.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def author_username
  @author_username
end

#bodyObject

Returns the value of attribute body.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def body
  @body
end

#created_atObject

Returns the value of attribute created_at.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def created_at
  @created_at
end

#external_idObject

Returns the value of attribute external_id.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def id
  @id
end

#is_hiddenObject

Returns the value of attribute is_hidden.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def is_hidden
  @is_hidden
end

#like_countObject

Returns the value of attribute like_count.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def like_count
  @like_count
end

#metadataObject

Returns the value of attribute metadata.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def 
  @metadata
end

#parent_external_idObject

Returns the value of attribute parent_external_id.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def parent_external_id
  @parent_external_id
end

Returns the value of attribute permalink.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def permalink
  @permalink
end

#platformObject

Returns the value of attribute platform.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def platform
  @platform
end

#platform_dataObject

Returns the value of attribute platform_data.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def platform_data
  @platform_data
end

#post_idObject

Returns the value of attribute post_id.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def post_id
  @post_id
end

#posted_atObject

Returns the value of attribute posted_at.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def posted_at
  @posted_at
end

#profile_idObject

Returns the value of attribute profile_id.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def profile_id
  @profile_id
end

#statusObject

Returns the value of attribute status.



616
617
618
# File 'lib/postproxy/types.rb', line 616

def status
  @status
end