Class: GetStream::Generated::Models::AddActivityRequest
- Defined in:
- lib/getstream_ruby/generated/models/add_activity_request.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
List of attachments for the activity.
-
#collection_refs ⇒ Array<String>
Collections that this activity references.
-
#copy_custom_to_notification ⇒ Boolean
Whether to copy custom data to the notification activity (only applies when create_notification_activity is true).
-
#create_notification_activity ⇒ Boolean
Whether to create notification activities for mentioned users.
-
#custom ⇒ Object
Custom data for the activity.
- #enrich_own_fields ⇒ Boolean
-
#expires_at ⇒ String
Expiration time for the activity.
-
#feeds ⇒ Array<String>
List of feeds to add the activity to with a default max limit of 25 feeds.
-
#filter_tags ⇒ Array<String>
Tags for filtering activities.
-
#id ⇒ String
Optional ID for the activity.
-
#interest_tags ⇒ Array<String>
Tags for indicating user interests.
- #location ⇒ ActivityLocation
-
#mentioned_user_ids ⇒ Array<String>
List of users mentioned in the activity.
-
#parent_id ⇒ String
ID of parent activity for replies/comments.
-
#poll_id ⇒ String
ID of a poll to attach to activity.
-
#restrict_replies ⇒ String
Controls who can add comments/replies to this activity.
-
#search_data ⇒ Object
Additional data for search indexing.
-
#skip_enrich_url ⇒ Boolean
Whether to skip URL enrichment for the activity.
-
#skip_push ⇒ Boolean
Whether to skip push notifications.
-
#text ⇒ String
Text content of the activity.
-
#type ⇒ String
Type of activity.
-
#user_id ⇒ String
ID of the user creating the activity.
-
#visibility ⇒ String
Visibility setting for the activity.
-
#visibility_tag ⇒ String
If visibility is ‘tag’, this is the tag name and is required.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AddActivityRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ AddActivityRequest
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/add_activity_request.rb', line 86 def initialize(attributes = {}) super(attributes) @type = attributes[:type] || attributes['type'] @feeds = attributes[:feeds] || attributes['feeds'] @copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil @create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil @expires_at = attributes[:expires_at] || attributes['expires_at'] || nil @id = attributes[:id] || attributes['id'] || nil @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @poll_id = attributes[:poll_id] || attributes['poll_id'] || nil @restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil @skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil @text = attributes[:text] || attributes['text'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @visibility = attributes[:visibility] || attributes['visibility'] || nil @visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil = attributes[:attachments] || attributes['attachments'] || nil @collection_refs = attributes[:collection_refs] || attributes['collection_refs'] || nil = attributes[:filter_tags] || attributes['filter_tags'] || nil = attributes[:interest_tags] || attributes['interest_tags'] || nil @mentioned_user_ids = attributes[:mentioned_user_ids] || attributes['mentioned_user_ids'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @location = attributes[:location] || attributes['location'] || nil @search_data = attributes[:search_data] || attributes['search_data'] || nil end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns List of attachments for the activity.
62 63 64 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 62 def end |
#collection_refs ⇒ Array<String>
Returns Collections that this activity references.
65 66 67 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 65 def collection_refs @collection_refs end |
#copy_custom_to_notification ⇒ Boolean
Returns Whether to copy custom data to the notification activity (only applies when create_notification_activity is true).
20 21 22 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 20 def copy_custom_to_notification @copy_custom_to_notification end |
#create_notification_activity ⇒ Boolean
Returns Whether to create notification activities for mentioned users.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 23 def create_notification_activity @create_notification_activity end |
#custom ⇒ Object
Returns Custom data for the activity.
77 78 79 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 77 def custom @custom end |
#enrich_own_fields ⇒ Boolean
26 27 28 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 26 def enrich_own_fields @enrich_own_fields end |
#expires_at ⇒ String
Returns Expiration time for the activity.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 29 def expires_at @expires_at end |
#feeds ⇒ Array<String>
Returns List of feeds to add the activity to with a default max limit of 25 feeds.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 17 def feeds @feeds end |
#filter_tags ⇒ Array<String>
Returns Tags for filtering activities.
68 69 70 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 68 def end |
#id ⇒ String
Returns Optional ID for the activity.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 32 def id @id end |
#interest_tags ⇒ Array<String>
Returns Tags for indicating user interests.
71 72 73 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 71 def end |
#location ⇒ ActivityLocation
80 81 82 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 80 def location @location end |
#mentioned_user_ids ⇒ Array<String>
Returns List of users mentioned in the activity.
74 75 76 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 74 def mentioned_user_ids @mentioned_user_ids end |
#parent_id ⇒ String
Returns ID of parent activity for replies/comments.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 35 def parent_id @parent_id end |
#poll_id ⇒ String
Returns ID of a poll to attach to activity.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 38 def poll_id @poll_id end |
#restrict_replies ⇒ String
Returns Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 41 def restrict_replies @restrict_replies end |
#search_data ⇒ Object
Returns Additional data for search indexing.
83 84 85 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 83 def search_data @search_data end |
#skip_enrich_url ⇒ Boolean
Returns Whether to skip URL enrichment for the activity.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 44 def skip_enrich_url @skip_enrich_url end |
#skip_push ⇒ Boolean
Returns Whether to skip push notifications.
47 48 49 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 47 def skip_push @skip_push end |
#text ⇒ String
Returns Text content of the activity.
50 51 52 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 50 def text @text end |
#type ⇒ String
Returns Type of activity.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 14 def type @type end |
#user_id ⇒ String
Returns ID of the user creating the activity.
53 54 55 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 53 def user_id @user_id end |
#visibility ⇒ String
Returns Visibility setting for the activity. One of: public, private, tag.
56 57 58 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 56 def visibility @visibility end |
#visibility_tag ⇒ String
Returns If visibility is ‘tag’, this is the tag name and is required.
59 60 61 |
# File 'lib/getstream_ruby/generated/models/add_activity_request.rb', line 59 def visibility_tag @visibility_tag 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/add_activity_request.rb', line 115 def self.json_field_mappings { type: 'type', feeds: 'feeds', copy_custom_to_notification: 'copy_custom_to_notification', create_notification_activity: 'create_notification_activity', enrich_own_fields: 'enrich_own_fields', expires_at: 'expires_at', id: 'id', parent_id: 'parent_id', poll_id: 'poll_id', restrict_replies: 'restrict_replies', skip_enrich_url: 'skip_enrich_url', skip_push: 'skip_push', text: 'text', user_id: 'user_id', visibility: 'visibility', visibility_tag: 'visibility_tag', attachments: 'attachments', collection_refs: 'collection_refs', filter_tags: 'filter_tags', interest_tags: 'interest_tags', mentioned_user_ids: 'mentioned_user_ids', custom: 'custom', location: 'location', search_data: 'search_data' } end |