Class: GetStream::Generated::Models::ActivityRequest

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

Initialize with attributes



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
113
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 87

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
  @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
  @attachments = attributes[:attachments] || attributes['attachments'] || nil
  @collection_refs = attributes[:collection_refs] || attributes['collection_refs'] || nil
  @collections = attributes[:collections] || attributes['collections'] || nil
  @filter_tags = attributes[:filter_tags] || attributes['filter_tags'] || nil
  @interest_tags = 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

#attachmentsArray<Attachment>

Returns List of attachments for the activity.

Returns:

  • (Array<Attachment>)

    List of attachments for the activity



60
61
62
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 60

def attachments
  @attachments
end

#collection_refsArray<String>

Returns Collections that this activity references.

Returns:

  • (Array<String>)

    Collections that this activity references



63
64
65
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 63

def collection_refs
  @collection_refs
end

#collectionsArray<CollectionRequest>

Returns Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.

Returns:

  • (Array<CollectionRequest>)

    Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.



66
67
68
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 66

def collections
  @collections
end

#copy_custom_to_notificationObject

Deprecated.

This field is deprecated. @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead



21
22
23
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 21

def copy_custom_to_notification
  @copy_custom_to_notification
end

#create_notification_activityBoolean

Returns Whether to create notification activities for mentioned users.

Returns:

  • (Boolean)

    Whether to create notification activities for mentioned users



24
25
26
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 24

def create_notification_activity
  @create_notification_activity
end

#customObject

Returns Custom data for the activity.

Returns:

  • (Object)

    Custom data for the activity



78
79
80
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 78

def custom
  @custom
end

#expires_atString

Returns Expiration time for the activity.

Returns:

  • (String)

    Expiration time for the activity



27
28
29
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 27

def expires_at
  @expires_at
end

#feedsArray<String>

Returns List of feeds to add the activity to with a default max limit of 25 feeds.

Returns:

  • (Array<String>)

    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/activity_request.rb', line 17

def feeds
  @feeds
end

#filter_tagsArray<String>

Returns Tags for filtering activities.

Returns:

  • (Array<String>)

    Tags for filtering activities



69
70
71
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 69

def filter_tags
  @filter_tags
end

#idString

Returns Optional ID for the activity.

Returns:

  • (String)

    Optional ID for the activity



30
31
32
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 30

def id
  @id
end

#interest_tagsArray<String>

Returns Tags for indicating user interests.

Returns:

  • (Array<String>)

    Tags for indicating user interests



72
73
74
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 72

def interest_tags
  @interest_tags
end

#locationLocation

Returns:



81
82
83
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 81

def location
  @location
end

#mentioned_user_idsArray<String>

Returns List of users mentioned in the activity.

Returns:

  • (Array<String>)

    List of users mentioned in the activity



75
76
77
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 75

def mentioned_user_ids
  @mentioned_user_ids
end

#parent_idString

Returns ID of parent activity for replies/comments.

Returns:

  • (String)

    ID of parent activity for replies/comments



33
34
35
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 33

def parent_id
  @parent_id
end

#poll_idString

Returns ID of a poll to attach to activity.

Returns:

  • (String)

    ID of a poll to attach to activity



36
37
38
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 36

def poll_id
  @poll_id
end

#restrict_repliesString

Returns Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody.

Returns:

  • (String)

    Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody



39
40
41
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 39

def restrict_replies
  @restrict_replies
end

#search_dataObject

Returns Additional data for search indexing.

Returns:

  • (Object)

    Additional data for search indexing



84
85
86
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 84

def search_data
  @search_data
end

#skip_enrich_urlBoolean

Returns Whether to skip URL enrichment for the activity.

Returns:

  • (Boolean)

    Whether to skip URL enrichment for the activity



42
43
44
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 42

def skip_enrich_url
  @skip_enrich_url
end

#skip_pushBoolean

Returns Whether to skip push notifications.

Returns:

  • (Boolean)

    Whether to skip push notifications



45
46
47
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 45

def skip_push
  @skip_push
end

#textString

Returns Text content of the activity.

Returns:

  • (String)

    Text content of the activity



48
49
50
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 48

def text
  @text
end

#typeString

Returns Type of activity.

Returns:

  • (String)

    Type of activity



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

def type
  @type
end

#user_idString

Returns ID of the user creating the activity.

Returns:

  • (String)

    ID of the user creating the activity



51
52
53
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 51

def user_id
  @user_id
end

#visibilityString

Returns Visibility setting for the activity. One of: public, private, tag.

Returns:

  • (String)

    Visibility setting for the activity. One of: public, private, tag



54
55
56
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 54

def visibility
  @visibility
end

#visibility_tagString

Returns If visibility is 'tag', this is the tag name and is required.

Returns:

  • (String)

    If visibility is 'tag', this is the tag name and is required



57
58
59
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 57

def visibility_tag
  @visibility_tag
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



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
143
# File 'lib/getstream_ruby/generated/models/activity_request.rb', line 116

def self.json_field_mappings
  {
    type: 'type',
    feeds: 'feeds',
    copy_custom_to_notification: 'copy_custom_to_notification',
    create_notification_activity: 'create_notification_activity',
    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',
    collections: 'collections',
    filter_tags: 'filter_tags',
    interest_tags: 'interest_tags',
    mentioned_user_ids: 'mentioned_user_ids',
    custom: 'custom',
    location: 'location',
    search_data: 'search_data'
  }
end