Class: GetStream::Generated::Models::ThreadedCommentResponse
- Defined in:
- lib/getstream_ruby/generated/models/threaded_comment_response.rb
Overview
A comment with an optional, depth‑limited slice of nested replies.
Instance Attribute Summary collapse
- #_object_id ⇒ String
- #attachments ⇒ Array<Attachment>
- #bookmark_count ⇒ Integer
- #confidence_score ⇒ Float
- #controversy_score ⇒ Float
- #created_at ⇒ DateTime
- #custom ⇒ Object
- #deleted_at ⇒ DateTime
- #downvote_count ⇒ Integer
- #edited_at ⇒ DateTime
- #hidden ⇒ Boolean
- #i18n ⇒ Hash<String, String>
- #id ⇒ String
- #latest_reactions ⇒ Array<FeedsReactionResponse>
- #mentioned_users ⇒ Array<UserResponse>
-
#meta ⇒ RepliesMeta
Cursor & depth information for a comment's direct replies.
- #moderation ⇒ ModerationV2Response
- #object_type ⇒ String
- #own_reactions ⇒ Array<FeedsReactionResponse>
- #parent_id ⇒ String
- #reaction_count ⇒ Integer
- #reaction_groups ⇒ Hash<String, FeedsReactionGroupResponse>
-
#replies ⇒ Array<ThreadedCommentResponse>
Slice of nested comments (may be empty).
- #reply_count ⇒ Integer
- #score ⇒ Integer
-
#status ⇒ CommentStatus
Status of the comment.
- #text ⇒ String
- #updated_at ⇒ DateTime
- #upvote_count ⇒ Integer
-
#user ⇒ UserResponse
User response object.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ThreadedCommentResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ThreadedCommentResponse
Initialize with attributes
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 104 def initialize(attributes = {}) super(attributes) @_object_id = attributes.fetch(:_object_id) { attributes.fetch('object_id', nil) } @bookmark_count = attributes.fetch(:bookmark_count) { attributes.fetch('bookmark_count', nil) } @confidence_score = attributes.fetch(:confidence_score) { attributes.fetch('confidence_score', nil) } @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } @downvote_count = attributes.fetch(:downvote_count) { attributes.fetch('downvote_count', nil) } @hidden = attributes.fetch(:hidden) { attributes.fetch('hidden', nil) } @id = attributes.fetch(:id) { attributes.fetch('id', nil) } @object_type = attributes.fetch(:object_type) { attributes.fetch('object_type', nil) } @reaction_count = attributes.fetch(:reaction_count) { attributes.fetch('reaction_count', nil) } @reply_count = attributes.fetch(:reply_count) { attributes.fetch('reply_count', nil) } @score = attributes.fetch(:score) { attributes.fetch('score', nil) } @status = attributes.fetch(:status) { attributes.fetch('status', nil) } @updated_at = attributes.fetch(:updated_at) { attributes.fetch('updated_at', nil) } @upvote_count = attributes.fetch(:upvote_count) { attributes.fetch('upvote_count', nil) } @mentioned_users = attributes.fetch(:mentioned_users) { attributes.fetch('mentioned_users', nil) } @own_reactions = attributes.fetch(:own_reactions) { attributes.fetch('own_reactions', nil) } @user = attributes.fetch(:user) { attributes.fetch('user', nil) } @controversy_score = attributes.fetch(:controversy_score) { attributes.fetch('controversy_score', nil) } @deleted_at = attributes.fetch(:deleted_at) { attributes.fetch('deleted_at', nil) } @edited_at = attributes.fetch(:edited_at) { attributes.fetch('edited_at', nil) } @parent_id = attributes.fetch(:parent_id) { attributes.fetch('parent_id', nil) } @text = attributes.fetch(:text) { attributes.fetch('text', nil) } @attachments = attributes.fetch(:attachments) { attributes.fetch('attachments', nil) } @latest_reactions = attributes.fetch(:latest_reactions) { attributes.fetch('latest_reactions', nil) } @replies = attributes.fetch(:replies) { attributes.fetch('replies', nil) } @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) } @i18n = attributes.fetch(:i18n) { attributes.fetch('i18n', nil) } @meta = attributes.fetch(:meta) { attributes.fetch('meta', nil) } @moderation = attributes.fetch(:moderation) { attributes.fetch('moderation', nil) } @reaction_groups = attributes.fetch(:reaction_groups) { attributes.fetch('reaction_groups', nil) } end |
Instance Attribute Details
#_object_id ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 14 def _object_id @_object_id end |
#attachments ⇒ Array<Attachment>
80 81 82 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 80 def @attachments end |
#bookmark_count ⇒ Integer
17 18 19 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 17 def bookmark_count @bookmark_count end |
#confidence_score ⇒ Float
20 21 22 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 20 def confidence_score @confidence_score end |
#controversy_score ⇒ Float
65 66 67 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 65 def controversy_score @controversy_score end |
#created_at ⇒ DateTime
23 24 25 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 23 def created_at @created_at end |
#custom ⇒ Object
89 90 91 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 89 def custom @custom end |
#deleted_at ⇒ DateTime
68 69 70 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 68 def deleted_at @deleted_at end |
#downvote_count ⇒ Integer
26 27 28 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 26 def downvote_count @downvote_count end |
#edited_at ⇒ DateTime
71 72 73 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 71 def edited_at @edited_at end |
#hidden ⇒ Boolean
29 30 31 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 29 def hidden @hidden end |
#i18n ⇒ Hash<String, String>
92 93 94 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 92 def i18n @i18n end |
#id ⇒ String
32 33 34 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 32 def id @id end |
#latest_reactions ⇒ Array<FeedsReactionResponse>
83 84 85 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 83 def latest_reactions @latest_reactions end |
#mentioned_users ⇒ Array<UserResponse>
56 57 58 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 56 def mentioned_users @mentioned_users end |
#meta ⇒ RepliesMeta
Returns Cursor & depth information for a comment's direct replies. Mirrors Reddit's 'load more replies' semantics.
95 96 97 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 95 def @meta end |
#moderation ⇒ ModerationV2Response
98 99 100 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 98 def moderation @moderation end |
#object_type ⇒ String
35 36 37 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 35 def object_type @object_type end |
#own_reactions ⇒ Array<FeedsReactionResponse>
59 60 61 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 59 def own_reactions @own_reactions end |
#parent_id ⇒ String
74 75 76 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 74 def parent_id @parent_id end |
#reaction_count ⇒ Integer
38 39 40 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 38 def reaction_count @reaction_count end |
#reaction_groups ⇒ Hash<String, FeedsReactionGroupResponse>
101 102 103 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 101 def reaction_groups @reaction_groups end |
#replies ⇒ Array<ThreadedCommentResponse>
Returns Slice of nested comments (may be empty).
86 87 88 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 86 def replies @replies end |
#reply_count ⇒ Integer
41 42 43 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 41 def reply_count @reply_count end |
#score ⇒ Integer
44 45 46 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 44 def score @score end |
#status ⇒ CommentStatus
Returns Status of the comment. One of: active, deleted, removed, hidden.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 47 def status @status end |
#text ⇒ String
77 78 79 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 77 def text @text end |
#updated_at ⇒ DateTime
50 51 52 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 50 def updated_at @updated_at end |
#upvote_count ⇒ Integer
53 54 55 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 53 def upvote_count @upvote_count end |
#user ⇒ UserResponse
Returns User response object.
62 63 64 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 62 def user @user end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/getstream_ruby/generated/models/threaded_comment_response.rb', line 139 def self.json_field_mappings { _object_id: 'object_id', bookmark_count: 'bookmark_count', confidence_score: 'confidence_score', created_at: 'created_at', downvote_count: 'downvote_count', hidden: 'hidden', id: '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', edited_at: 'edited_at', parent_id: 'parent_id', text: 'text', attachments: 'attachments', latest_reactions: 'latest_reactions', replies: 'replies', custom: 'custom', i18n: 'i18n', meta: 'meta', moderation: 'moderation', reaction_groups: 'reaction_groups' } end |