Class: GetStream::Generated::Models::CommentResponse
- Defined in:
- lib/getstream_ruby/generated/models/comment_response.rb
Instance Attribute Summary collapse
- #attachments ⇒ Array<Attachment>
-
#confidence_score ⇒ Float
Confidence score of the comment.
-
#controversy_score ⇒ Float
Controversy score of the comment.
-
#created_at ⇒ DateTime
When the comment was created.
-
#custom ⇒ Object
Custom data for the comment.
-
#deleted_at ⇒ DateTime
When the comment was deleted.
-
#downvote_count ⇒ Integer
Number of downvotes for this comment.
-
#id ⇒ String
Unique identifier for the comment.
-
#latest_reactions ⇒ Array<FeedsReactionResponse>
Recent reactions to the comment.
-
#mentioned_users ⇒ Array<UserResponse>
Users mentioned in the comment.
- #moderation ⇒ ModerationV2Response
-
#object_id ⇒ String
ID of the object this comment is associated with.
-
#object_type ⇒ String
Type of the object this comment is associated with.
-
#own_reactions ⇒ Array<FeedsReactionResponse>
Current user’s reactions to this activity.
-
#parent_id ⇒ String
ID of parent comment for nested replies.
-
#reaction_count ⇒ Integer
Number of reactions to this comment.
-
#reaction_groups ⇒ Hash<String, ReactionGroupResponse>
Grouped reactions by type.
-
#reply_count ⇒ Integer
Number of replies to this comment.
-
#score ⇒ Integer
Score of the comment based on reactions.
-
#status ⇒ String
Status of the comment (e.g., active, deleted).
-
#text ⇒ String
Text content of the comment.
-
#updated_at ⇒ DateTime
When the comment was last updated.
-
#upvote_count ⇒ Integer
Number of upvotes for this comment.
- #user ⇒ UserResponse
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CommentResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ CommentResponse
Initialize with attributes
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 86 def initialize(attributes = {}) super(attributes) @confidence_score = attributes[:confidence_score] || attributes['confidence_score'] @created_at = attributes[:created_at] || attributes['created_at'] @downvote_count = attributes[:downvote_count] || attributes['downvote_count'] @id = attributes[:id] || attributes['id'] @object_id = attributes[:object_id] || attributes['object_id'] @object_type = attributes[:object_type] || attributes['object_type'] @reaction_count = attributes[:reaction_count] || attributes['reaction_count'] @reply_count = attributes[:reply_count] || attributes['reply_count'] @score = attributes[:score] || attributes['score'] @status = attributes[:status] || attributes['status'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @upvote_count = attributes[:upvote_count] || attributes['upvote_count'] @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] @own_reactions = attributes[:own_reactions] || attributes['own_reactions'] @user = attributes[:user] || attributes['user'] @controversy_score = attributes[:controversy_score] || attributes['controversy_score'] || nil @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @text = attributes[:text] || attributes['text'] || nil = attributes[:attachments] || attributes['attachments'] || nil @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @moderation = attributes[:moderation] || attributes['moderation'] || nil @reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] || nil end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
71 72 73 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 71 def end |
#confidence_score ⇒ Float
Returns Confidence score of the comment.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 14 def confidence_score @confidence_score end |
#controversy_score ⇒ Float
Returns Controversy score of the comment.
59 60 61 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 59 def controversy_score @controversy_score end |
#created_at ⇒ DateTime
Returns When the comment was created.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 17 def created_at @created_at end |
#custom ⇒ Object
Returns Custom data for the comment.
77 78 79 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 77 def custom @custom end |
#deleted_at ⇒ DateTime
Returns When the comment was deleted.
62 63 64 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 62 def deleted_at @deleted_at end |
#downvote_count ⇒ Integer
Returns Number of downvotes for this comment.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 20 def downvote_count @downvote_count end |
#id ⇒ String
Returns Unique identifier for the comment.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 23 def id @id end |
#latest_reactions ⇒ Array<FeedsReactionResponse>
Returns Recent reactions to the comment.
74 75 76 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 74 def latest_reactions @latest_reactions end |
#mentioned_users ⇒ Array<UserResponse>
Returns Users mentioned in the comment.
50 51 52 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 50 def mentioned_users @mentioned_users end |
#moderation ⇒ ModerationV2Response
80 81 82 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 80 def moderation @moderation end |
#object_id ⇒ String
Returns ID of the object this comment is associated with.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 26 def object_id @object_id end |
#object_type ⇒ String
Returns Type of the object this comment is associated with.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 29 def object_type @object_type end |
#own_reactions ⇒ Array<FeedsReactionResponse>
Returns Current user’s reactions to this activity.
53 54 55 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 53 def own_reactions @own_reactions end |
#parent_id ⇒ String
Returns ID of parent comment for nested replies.
65 66 67 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 65 def parent_id @parent_id end |
#reaction_count ⇒ Integer
Returns Number of reactions to this comment.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 32 def reaction_count @reaction_count end |
#reaction_groups ⇒ Hash<String, ReactionGroupResponse>
Returns Grouped reactions by type.
83 84 85 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 83 def reaction_groups @reaction_groups end |
#reply_count ⇒ Integer
Returns Number of replies to this comment.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 35 def reply_count @reply_count end |
#score ⇒ Integer
Returns Score of the comment based on reactions.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 38 def score @score end |
#status ⇒ String
Returns Status of the comment (e.g., active, deleted).
41 42 43 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 41 def status @status end |
#text ⇒ String
Returns Text content of the comment.
68 69 70 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 68 def text @text end |
#updated_at ⇒ DateTime
Returns When the comment was last updated.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 44 def updated_at @updated_at end |
#upvote_count ⇒ Integer
Returns Number of upvotes for this comment.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 47 def upvote_count @upvote_count end |
#user ⇒ UserResponse
56 57 58 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 56 def user @user end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/getstream_ruby/generated/models/comment_response.rb', line 115 def self.json_field_mappings { confidence_score: 'confidence_score', created_at: 'created_at', downvote_count: 'downvote_count', id: 'id', object_id: 'object_id', object_type: 'object_type', reaction_count: 'reaction_count', reply_count: 'reply_count', score: 'score', status: 'status', updated_at: 'updated_at', upvote_count: 'upvote_count', mentioned_users: 'mentioned_users', own_reactions: 'own_reactions', user: 'user', controversy_score: 'controversy_score', deleted_at: 'deleted_at', parent_id: 'parent_id', text: 'text', attachments: 'attachments', latest_reactions: 'latest_reactions', custom: 'custom', moderation: 'moderation', reaction_groups: 'reaction_groups' } end |