Class: GetStream::Generated::Models::GetFeedCountsResponse
- Defined in:
- lib/getstream_ruby/generated/models/get_feed_counts_response.rb
Instance Attribute Summary collapse
-
#activity_count ⇒ Integer
Number of activities in the feed.
-
#comment_count ⇒ Integer
Total number of comments on those activities, including nested replies.
- #duration ⇒ String
-
#total_count ⇒ Integer
Sum of activity_count and comment_count.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ GetFeedCountsResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ GetFeedCountsResponse
Initialize with attributes
26 27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/get_feed_counts_response.rb', line 26 def initialize(attributes = {}) super(attributes) @activity_count = attributes[:activity_count] || attributes['activity_count'] @comment_count = attributes[:comment_count] || attributes['comment_count'] @duration = attributes[:duration] || attributes['duration'] @total_count = attributes[:total_count] || attributes['total_count'] end |
Instance Attribute Details
#activity_count ⇒ Integer
Returns Number of activities in the feed.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/get_feed_counts_response.rb', line 14 def activity_count @activity_count end |
#comment_count ⇒ Integer
Returns Total number of comments on those activities, including nested replies.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/get_feed_counts_response.rb', line 17 def comment_count @comment_count end |
#duration ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/get_feed_counts_response.rb', line 20 def duration @duration end |
#total_count ⇒ Integer
Returns Sum of activity_count and comment_count.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/get_feed_counts_response.rb', line 23 def total_count @total_count 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/get_feed_counts_response.rb', line 35 def self.json_field_mappings { activity_count: 'activity_count', comment_count: 'comment_count', duration: 'duration', total_count: 'total_count' } end |