Class: GetStream::Generated::Models::GetCommentsResponse
- Defined in:
- lib/getstream_ruby/generated/models/get_comments_response.rb
Instance Attribute Summary collapse
-
#comment_count ⇒ Integer
Total number of comments on the object, including replies at every depth.
-
#comments ⇒ Array<ThreadedCommentResponse>
Threaded listing for the activity.
- #duration ⇒ String
- #next ⇒ String
- #prev ⇒ String
-
#sort ⇒ String
Sort order used for the comments (first, last, top, best, controversial, popular, mutuals).
-
#top_level_comment_count ⇒ Integer
Number of comments directly on the object, excluding replies.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ GetCommentsResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ GetCommentsResponse
Initialize with attributes
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 35 def initialize(attributes = {}) super(attributes) @comment_count = attributes.fetch(:comment_count) { attributes.fetch('comment_count', nil) } @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) } @sort = attributes.fetch(:sort) { attributes.fetch('sort', nil) } @comments = attributes.fetch(:comments) { attributes.fetch('comments', nil) } @next = attributes.fetch(:next) { attributes.fetch('next', nil) } @prev = attributes.fetch(:prev) { attributes.fetch('prev', nil) } @top_level_comment_count = attributes.fetch(:top_level_comment_count) { attributes.fetch('top_level_comment_count', nil) } end |
Instance Attribute Details
#comment_count ⇒ Integer
Returns Total number of comments on the object, including replies at every depth.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 14 def comment_count @comment_count end |
#comments ⇒ Array<ThreadedCommentResponse>
Returns Threaded listing for the activity.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 23 def comments @comments end |
#duration ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 17 def duration @duration end |
#next ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 26 def next @next end |
#prev ⇒ String
29 30 31 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 29 def prev @prev end |
#sort ⇒ String
Returns Sort order used for the comments (first, last, top, best, controversial, popular, mutuals).
20 21 22 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 20 def sort @sort end |
#top_level_comment_count ⇒ Integer
Returns Number of comments directly on the object, excluding replies. Independent of depth, replies_limit and id_around, and not adjusted per viewer. Only present when include_top_level_comment_count is set.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 32 def top_level_comment_count @top_level_comment_count end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/getstream_ruby/generated/models/get_comments_response.rb', line 47 def self.json_field_mappings { comment_count: 'comment_count', duration: 'duration', sort: 'sort', comments: 'comments', next: 'next', prev: 'prev', top_level_comment_count: 'top_level_comment_count' } end |