Class: GetStream::Generated::Models::QueryFollowsResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/query_follows_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 = {}) ⇒ QueryFollowsResponse

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/query_follows_response.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @duration = attributes.fetch(:duration) { attributes.fetch('duration', nil) }
  @follows = attributes.fetch(:follows) { attributes.fetch('follows', nil) }
  @next = attributes.fetch(:next) { attributes.fetch('next', nil) }
  @prev = attributes.fetch(:prev) { attributes.fetch('prev', nil) }
  @group_counts = attributes.fetch(:group_counts) { attributes.fetch('group_counts', nil) }
end

Instance Attribute Details

#duration ⇒ String

Returns:

  • (String)


14
15
16
# File 'lib/getstream_ruby/generated/models/query_follows_response.rb', line 14

def duration
  @duration
end

#follows ⇒ Array<FollowResponse>

Returns List of follow relationships matching the query.

Returns:

  • (Array<FollowResponse>) —

    List of follow relationships matching the query



17
18
19
# File 'lib/getstream_ruby/generated/models/query_follows_response.rb', line 17

def follows
  @follows
end

#group_counts ⇒ Hash<String, Integer>

Returns Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality.

Returns:

  • (Hash<String, Integer>) —

    Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality.



26
27
28
# File 'lib/getstream_ruby/generated/models/query_follows_response.rb', line 26

def group_counts
  @group_counts
end

#next ⇒ String

Returns Cursor for next page.

Returns:

  • (String) —

    Cursor for next page



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

def next
  @next
end

#prev ⇒ String

Returns Cursor for previous page.

Returns:

  • (String) —

    Cursor for previous page



23
24
25
# File 'lib/getstream_ruby/generated/models/query_follows_response.rb', line 23

def prev
  @prev
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/query_follows_response.rb', line 39

def self.json_field_mappings
  {
    duration: 'duration',
    follows: 'follows',
    next: 'next',
    prev: 'prev',
    group_counts: 'group_counts'
  }
end