Skip to content

Commit 69b8882

Browse files
authored
Merge pull request #21 from GetStream/FEEDS-1126
[FEEDS-1126] sdk update
2 parents 5144b88 + c0f352c commit 69b8882

90 files changed

Lines changed: 2401 additions & 40 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/getstream_ruby/generated/common_client.rb

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,73 @@ def create_import(create_import_request)
408408
)
409409
end
410410

411+
# Lists all import v2 tasks for the app
412+
#
413+
# @param state [Integer]
414+
# @return [Models::ListImportV2TasksResponse]
415+
def list_import_v2_tasks(state = nil)
416+
path = '/api/v2/imports/v2'
417+
# Build query parameters
418+
query_params = {}
419+
query_params['state'] = state unless state.nil?
420+
421+
# Make the API request
422+
@client.make_request(
423+
:get,
424+
path,
425+
query_params: query_params
426+
)
427+
end
428+
429+
# Creates a new import v2 task
430+
#
431+
# @param create_import_v2_task_request [CreateImportV2TaskRequest]
432+
# @return [Models::CreateImportV2TaskResponse]
433+
def create_import_v2_task(create_import_v2_task_request)
434+
path = '/api/v2/imports/v2'
435+
# Build request body
436+
body = create_import_v2_task_request
437+
438+
# Make the API request
439+
@client.make_request(
440+
:post,
441+
path,
442+
body: body
443+
)
444+
end
445+
446+
# Deletes an import v2 task. Can only delete tasks in queued state.
447+
#
448+
# @param _id [String]
449+
# @return [Models::DeleteImportV2TaskResponse]
450+
def delete_import_v2_task(_id)
451+
path = '/api/v2/imports/v2/{id}'
452+
# Replace path parameters
453+
path = path.gsub('{id}', _id.to_s)
454+
455+
# Make the API request
456+
@client.make_request(
457+
:delete,
458+
path
459+
)
460+
end
461+
462+
# Gets a single import v2 task by ID
463+
#
464+
# @param _id [String]
465+
# @return [Models::GetImportV2TaskResponse]
466+
def get_import_v2_task(_id)
467+
path = '/api/v2/imports/v2/{id}'
468+
# Replace path parameters
469+
path = path.gsub('{id}', _id.to_s)
470+
471+
# Make the API request
472+
@client.make_request(
473+
:get,
474+
path
475+
)
476+
end
477+
411478
# Gets an import
412479
#
413480
# @param _id [String]

lib/getstream_ruby/generated/feeds_client.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,12 @@ def upsert_collections(upsert_collections_request)
516516
# @param depth [Integer]
517517
# @param sort [String]
518518
# @param replies_limit [Integer]
519+
# @param user_id [String]
519520
# @param limit [Integer]
520521
# @param prev [String]
521522
# @param _next [String]
522523
# @return [Models::GetCommentsResponse]
523-
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, limit = nil, prev = nil, _next = nil)
524+
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
524525
path = '/api/v2/feeds/comments'
525526
# Build query parameters
526527
query_params = {}
@@ -529,6 +530,7 @@ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit
529530
query_params['depth'] = depth unless depth.nil?
530531
query_params['sort'] = sort unless sort.nil?
531532
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
533+
query_params['user_id'] = user_id unless user_id.nil?
532534
query_params['limit'] = limit unless limit.nil?
533535
query_params['prev'] = prev unless prev.nil?
534536
query_params['next'] = _next unless _next.nil?
@@ -718,11 +720,12 @@ def delete_comment_reaction(_id, _type, user_id = nil)
718720
# @param depth [Integer]
719721
# @param sort [String]
720722
# @param replies_limit [Integer]
723+
# @param user_id [String]
721724
# @param limit [Integer]
722725
# @param prev [String]
723726
# @param _next [String]
724727
# @return [Models::GetCommentRepliesResponse]
725-
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, limit = nil, prev = nil, _next = nil)
728+
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
726729
path = '/api/v2/feeds/comments/{id}/replies'
727730
# Replace path parameters
728731
path = path.gsub('{id}', _id.to_s)
@@ -731,6 +734,7 @@ def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, limit
731734
query_params['depth'] = depth unless depth.nil?
732735
query_params['sort'] = sort unless sort.nil?
733736
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
737+
query_params['user_id'] = user_id unless user_id.nil?
734738
query_params['limit'] = limit unless limit.nil?
735739
query_params['prev'] = prev unless prev.nil?
736740
query_params['next'] = _next unless _next.nil?

lib/getstream_ruby/generated/models/activity_request.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ class ActivityRequest < GetStream::BaseModel
1313
# @return [String] Type of activity
1414
attr_accessor :type
1515
# @!attribute feeds
16-
# @return [Array<String>] List of feed IDs to add the activity to
16+
# @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
1717
attr_accessor :feeds
18+
# @!attribute create_notification_activity
19+
# @return [Boolean] Whether to create notification activities for mentioned users
20+
attr_accessor :create_notification_activity
1821
# @!attribute expires_at
1922
# @return [String] Expiration time for the activity
2023
attr_accessor :expires_at
@@ -33,6 +36,9 @@ class ActivityRequest < GetStream::BaseModel
3336
# @!attribute skip_enrich_url
3437
# @return [Boolean] Whether to skip URL enrichment for the activity
3538
attr_accessor :skip_enrich_url
39+
# @!attribute skip_push
40+
# @return [Boolean] Whether to skip push notifications
41+
attr_accessor :skip_push
3642
# @!attribute text
3743
# @return [String] Text content of the activity
3844
attr_accessor :text
@@ -75,12 +81,14 @@ def initialize(attributes = {})
7581
super(attributes)
7682
@type = attributes[:type] || attributes['type']
7783
@feeds = attributes[:feeds] || attributes['feeds']
84+
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
7885
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
7986
@id = attributes[:id] || attributes['id'] || nil
8087
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
8188
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
8289
@restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil
8390
@skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil
91+
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
8492
@text = attributes[:text] || attributes['text'] || nil
8593
@user_id = attributes[:user_id] || attributes['user_id'] || nil
8694
@visibility = attributes[:visibility] || attributes['visibility'] || nil
@@ -100,12 +108,14 @@ def self.json_field_mappings
100108
{
101109
type: 'type',
102110
feeds: 'feeds',
111+
create_notification_activity: 'create_notification_activity',
103112
expires_at: 'expires_at',
104113
id: 'id',
105114
parent_id: 'parent_id',
106115
poll_id: 'poll_id',
107116
restrict_replies: 'restrict_replies',
108117
skip_enrich_url: 'skip_enrich_url',
118+
skip_push: 'skip_push',
109119
text: 'text',
110120
user_id: 'user_id',
111121
visibility: 'visibility',

lib/getstream_ruby/generated/models/activity_response.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ class ActivityResponse < GetStream::BaseModel
108108
# @!attribute moderation_action
109109
# @return [String]
110110
attr_accessor :moderation_action
111+
# @!attribute selector_source
112+
# @return [String] Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking.
113+
attr_accessor :selector_source
111114
# @!attribute text
112115
# @return [String] Text content of the activity
113116
attr_accessor :text
@@ -169,6 +172,7 @@ def initialize(attributes = {})
169172
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
170173
@is_watched = attributes[:is_watched] || attributes['is_watched'] || nil
171174
@moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil
175+
@selector_source = attributes[:selector_source] || attributes['selector_source'] || nil
172176
@text = attributes[:text] || attributes['text'] || nil
173177
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil
174178
@current_feed = attributes[:current_feed] || attributes['current_feed'] || nil
@@ -215,6 +219,7 @@ def self.json_field_mappings
215219
expires_at: 'expires_at',
216220
is_watched: 'is_watched',
217221
moderation_action: 'moderation_action',
222+
selector_source: 'selector_source',
218223
text: 'text',
219224
visibility_tag: 'visibility_tag',
220225
current_feed: 'current_feed',

lib/getstream_ruby/generated/models/add_activity_request.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ class AddActivityRequest < GetStream::BaseModel
1313
# @return [String] Type of activity
1414
attr_accessor :type
1515
# @!attribute feeds
16-
# @return [Array<String>] List of feed IDs to add the activity to
16+
# @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
1717
attr_accessor :feeds
18+
# @!attribute create_notification_activity
19+
# @return [Boolean] Whether to create notification activities for mentioned users
20+
attr_accessor :create_notification_activity
1821
# @!attribute expires_at
1922
# @return [String] Expiration time for the activity
2023
attr_accessor :expires_at
@@ -33,6 +36,9 @@ class AddActivityRequest < GetStream::BaseModel
3336
# @!attribute skip_enrich_url
3437
# @return [Boolean] Whether to skip URL enrichment for the activity
3538
attr_accessor :skip_enrich_url
39+
# @!attribute skip_push
40+
# @return [Boolean] Whether to skip push notifications
41+
attr_accessor :skip_push
3642
# @!attribute text
3743
# @return [String] Text content of the activity
3844
attr_accessor :text
@@ -75,12 +81,14 @@ def initialize(attributes = {})
7581
super(attributes)
7682
@type = attributes[:type] || attributes['type']
7783
@feeds = attributes[:feeds] || attributes['feeds']
84+
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
7885
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
7986
@id = attributes[:id] || attributes['id'] || nil
8087
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
8188
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
8289
@restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil
8390
@skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil
91+
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
8492
@text = attributes[:text] || attributes['text'] || nil
8593
@user_id = attributes[:user_id] || attributes['user_id'] || nil
8694
@visibility = attributes[:visibility] || attributes['visibility'] || nil
@@ -100,12 +108,14 @@ def self.json_field_mappings
100108
{
101109
type: 'type',
102110
feeds: 'feeds',
111+
create_notification_activity: 'create_notification_activity',
103112
expires_at: 'expires_at',
104113
id: 'id',
105114
parent_id: 'parent_id',
106115
poll_id: 'poll_id',
107116
restrict_replies: 'restrict_replies',
108117
skip_enrich_url: 'skip_enrich_url',
118+
skip_push: 'skip_push',
109119
text: 'text',
110120
user_id: 'user_id',
111121
visibility: 'visibility',

lib/getstream_ruby/generated/models/add_activity_response.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,24 @@ class AddActivityResponse < GetStream::BaseModel
1515
# @!attribute activity
1616
# @return [ActivityResponse]
1717
attr_accessor :activity
18+
# @!attribute mention_notifications_created
19+
# @return [Integer] Number of mention notification activities created for mentioned users
20+
attr_accessor :mention_notifications_created
1821

1922
# Initialize with attributes
2023
def initialize(attributes = {})
2124
super(attributes)
2225
@duration = attributes[:duration] || attributes['duration']
2326
@activity = attributes[:activity] || attributes['activity']
27+
@mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil
2428
end
2529

2630
# Override field mappings for JSON serialization
2731
def self.json_field_mappings
2832
{
2933
duration: 'duration',
30-
activity: 'activity'
34+
activity: 'activity',
35+
mention_notifications_created: 'mention_notifications_created'
3136
}
3237
end
3338
end

lib/getstream_ruby/generated/models/add_comment_reaction_response.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,26 @@ class AddCommentReactionResponse < GetStream::BaseModel
1818
# @!attribute reaction
1919
# @return [FeedsReactionResponse]
2020
attr_accessor :reaction
21+
# @!attribute notification_created
22+
# @return [Boolean] Whether a notification activity was successfully created
23+
attr_accessor :notification_created
2124

2225
# Initialize with attributes
2326
def initialize(attributes = {})
2427
super(attributes)
2528
@duration = attributes[:duration] || attributes['duration']
2629
@comment = attributes[:comment] || attributes['comment']
2730
@reaction = attributes[:reaction] || attributes['reaction']
31+
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
2832
end
2933

3034
# Override field mappings for JSON serialization
3135
def self.json_field_mappings
3236
{
3337
duration: 'duration',
3438
comment: 'comment',
35-
reaction: 'reaction'
39+
reaction: 'reaction',
40+
notification_created: 'notification_created'
3641
}
3742
end
3843
end

lib/getstream_ruby/generated/models/add_comment_response.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,29 @@ class AddCommentResponse < GetStream::BaseModel
1515
# @!attribute comment
1616
# @return [CommentResponse]
1717
attr_accessor :comment
18+
# @!attribute mention_notifications_created
19+
# @return [Integer] Number of mention notification activities created for mentioned users
20+
attr_accessor :mention_notifications_created
21+
# @!attribute notification_created
22+
# @return [Boolean] Whether a notification activity was successfully created
23+
attr_accessor :notification_created
1824

1925
# Initialize with attributes
2026
def initialize(attributes = {})
2127
super(attributes)
2228
@duration = attributes[:duration] || attributes['duration']
2329
@comment = attributes[:comment] || attributes['comment']
30+
@mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil
31+
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
2432
end
2533

2634
# Override field mappings for JSON serialization
2735
def self.json_field_mappings
2836
{
2937
duration: 'duration',
30-
comment: 'comment'
38+
comment: 'comment',
39+
mention_notifications_created: 'mention_notifications_created',
40+
notification_created: 'notification_created'
3141
}
3242
end
3343
end

lib/getstream_ruby/generated/models/add_reaction_response.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,26 @@ class AddReactionResponse < GetStream::BaseModel
1818
# @!attribute reaction
1919
# @return [FeedsReactionResponse]
2020
attr_accessor :reaction
21+
# @!attribute notification_created
22+
# @return [Boolean] Whether a notification activity was successfully created
23+
attr_accessor :notification_created
2124

2225
# Initialize with attributes
2326
def initialize(attributes = {})
2427
super(attributes)
2528
@duration = attributes[:duration] || attributes['duration']
2629
@activity = attributes[:activity] || attributes['activity']
2730
@reaction = attributes[:reaction] || attributes['reaction']
31+
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
2832
end
2933

3034
# Override field mappings for JSON serialization
3135
def self.json_field_mappings
3236
{
3337
duration: 'duration',
3438
activity: 'activity',
35-
reaction: 'reaction'
39+
reaction: 'reaction',
40+
notification_created: 'notification_created'
3641
}
3742
end
3843
end

0 commit comments

Comments
 (0)