Class: GetStream::Generated::Models::GetFeedCountsResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/get_feed_counts_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_countInteger

Returns Number of activities in the feed.

Returns:

  • (Integer)

    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_countInteger

Returns Total number of comments on those activities, including nested replies.

Returns:

  • (Integer)

    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

#durationString

Returns:

  • (String)


20
21
22
# File 'lib/getstream_ruby/generated/models/get_feed_counts_response.rb', line 20

def duration
  @duration
end

#total_countInteger

Returns Sum of activity_count and comment_count.

Returns:

  • (Integer)

    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_mappingsObject

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