Class: GetStream::Generated::Models::RepliesMeta
- Defined in:
- lib/getstream_ruby/generated/models/replies_meta.rb
Overview
Cursor & depth information for a comment’s direct replies. Mirrors Reddit’s ‘load more replies’ semantics.
Instance Attribute Summary collapse
-
#depth_truncated ⇒ Boolean
True if the subtree was cut because the requested depth was reached.
-
#has_more ⇒ Boolean
True if more siblings exist in the database.
-
#next_cursor ⇒ String
Opaque cursor to request the next page of siblings.
-
#remaining ⇒ Integer
Number of unread siblings that match current filters.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ RepliesMeta
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ RepliesMeta
Initialize with attributes
26 27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/replies_meta.rb', line 26 def initialize(attributes = {}) super(attributes) @depth_truncated = attributes[:depth_truncated] || attributes['depth_truncated'] @has_more = attributes[:has_more] || attributes['has_more'] @remaining = attributes[:remaining] || attributes['remaining'] @next_cursor = attributes[:next_cursor] || attributes['next_cursor'] || nil end |
Instance Attribute Details
#depth_truncated ⇒ Boolean
14 15 16 |
# File 'lib/getstream_ruby/generated/models/replies_meta.rb', line 14 def depth_truncated @depth_truncated end |
#has_more ⇒ Boolean
17 18 19 |
# File 'lib/getstream_ruby/generated/models/replies_meta.rb', line 17 def has_more @has_more end |
#next_cursor ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/replies_meta.rb', line 23 def next_cursor @next_cursor end |
#remaining ⇒ Integer
20 21 22 |
# File 'lib/getstream_ruby/generated/models/replies_meta.rb', line 20 def remaining @remaining end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
35 36 37 38 39 40 41 42 |
# File 'lib/getstream_ruby/generated/models/replies_meta.rb', line 35 def self.json_field_mappings { depth_truncated: 'depth_truncated', has_more: 'has_more', remaining: 'remaining', next_cursor: 'next_cursor' } end |