Class: GetStream::Generated::Models::InterestTagResponse
- Defined in:
- lib/getstream_ruby/generated/models/interest_tag_response.rb
Overview
An interest tag of a user with its ranking weight and, for computed tags, how many distinct reacted-to activities carried it
Instance Attribute Summary collapse
-
#count ⇒ Integer
Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags.
-
#source ⇒ String
How the tag was set: computed (from the user's reactions) or manual (through the API).
-
#tag ⇒ String
The interest tag value.
-
#weight ⇒ Float
Ranking weight between -1.0 and 1.0.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ InterestTagResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ InterestTagResponse
Initialize with attributes
26 27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/interest_tag_response.rb', line 26 def initialize(attributes = {}) super(attributes) @count = attributes.fetch(:count) { attributes.fetch('count', nil) } @source = attributes.fetch(:source) { attributes.fetch('source', nil) } @tag = attributes.fetch(:tag) { attributes.fetch('tag', nil) } @weight = attributes.fetch(:weight) { attributes.fetch('weight', nil) } end |
Instance Attribute Details
#count ⇒ Integer
Returns Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/interest_tag_response.rb', line 14 def count @count end |
#source ⇒ String
Returns How the tag was set: computed (from the user's reactions) or manual (through the API).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/interest_tag_response.rb', line 17 def source @source end |
#tag ⇒ String
Returns The interest tag value.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/interest_tag_response.rb', line 20 def tag @tag end |
#weight ⇒ Float
Returns Ranking weight between -1.0 and 1.0. Computed tags carry a recency-decayed weight in (0, 1.0]: the user's strongest tag is 1.0 and every other a proportional share.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/interest_tag_response.rb', line 23 def weight @weight 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/interest_tag_response.rb', line 35 def self.json_field_mappings { count: 'count', source: 'source', tag: 'tag', weight: 'weight' } end |