Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions lib/getstream_ruby/generated/common_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,73 @@ def create_import(create_import_request)
)
end

# Lists all import v2 tasks for the app
#
# @param state [Integer]
# @return [Models::ListImportV2TasksResponse]
def list_import_v2_tasks(state = nil)
path = '/api/v2/imports/v2'
# Build query parameters
query_params = {}
query_params['state'] = state unless state.nil?

# Make the API request
@client.make_request(
:get,
path,
query_params: query_params
)
end

# Creates a new import v2 task
#
# @param create_import_v2_task_request [CreateImportV2TaskRequest]
# @return [Models::CreateImportV2TaskResponse]
def create_import_v2_task(create_import_v2_task_request)
path = '/api/v2/imports/v2'
# Build request body
body = create_import_v2_task_request

# Make the API request
@client.make_request(
:post,
path,
body: body
)
end

# Deletes an import v2 task. Can only delete tasks in queued state.
#
# @param _id [String]
# @return [Models::DeleteImportV2TaskResponse]
def delete_import_v2_task(_id)
path = '/api/v2/imports/v2/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)

# Make the API request
@client.make_request(
:delete,
path
)
end

# Gets a single import v2 task by ID
#
# @param _id [String]
# @return [Models::GetImportV2TaskResponse]
def get_import_v2_task(_id)
path = '/api/v2/imports/v2/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)

# Make the API request
@client.make_request(
:get,
path
)
end

# Gets an import
#
# @param _id [String]
Expand Down
8 changes: 6 additions & 2 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,12 @@ def upsert_collections(upsert_collections_request)
# @param depth [Integer]
# @param sort [String]
# @param replies_limit [Integer]
# @param user_id [String]
# @param limit [Integer]
# @param prev [String]
# @param _next [String]
# @return [Models::GetCommentsResponse]
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, limit = nil, prev = nil, _next = nil)
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
path = '/api/v2/feeds/comments'
# Build query parameters
query_params = {}
Expand All @@ -529,6 +530,7 @@ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit
query_params['depth'] = depth unless depth.nil?
query_params['sort'] = sort unless sort.nil?
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
query_params['user_id'] = user_id unless user_id.nil?
query_params['limit'] = limit unless limit.nil?
query_params['prev'] = prev unless prev.nil?
query_params['next'] = _next unless _next.nil?
Expand Down Expand Up @@ -718,11 +720,12 @@ def delete_comment_reaction(_id, _type, user_id = nil)
# @param depth [Integer]
# @param sort [String]
# @param replies_limit [Integer]
# @param user_id [String]
# @param limit [Integer]
# @param prev [String]
# @param _next [String]
# @return [Models::GetCommentRepliesResponse]
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, limit = nil, prev = nil, _next = nil)
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
path = '/api/v2/feeds/comments/{id}/replies'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
Expand All @@ -731,6 +734,7 @@ def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, limit
query_params['depth'] = depth unless depth.nil?
query_params['sort'] = sort unless sort.nil?
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
query_params['user_id'] = user_id unless user_id.nil?
query_params['limit'] = limit unless limit.nil?
query_params['prev'] = prev unless prev.nil?
query_params['next'] = _next unless _next.nil?
Expand Down
12 changes: 11 additions & 1 deletion lib/getstream_ruby/generated/models/activity_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ class ActivityRequest < GetStream::BaseModel
# @return [String] Type of activity
attr_accessor :type
# @!attribute feeds
# @return [Array<String>] List of feed IDs to add the activity to
# @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
attr_accessor :feeds
# @!attribute create_notification_activity
# @return [Boolean] Whether to create notification activities for mentioned users
attr_accessor :create_notification_activity
# @!attribute expires_at
# @return [String] Expiration time for the activity
attr_accessor :expires_at
Expand All @@ -33,6 +36,9 @@ class ActivityRequest < GetStream::BaseModel
# @!attribute skip_enrich_url
# @return [Boolean] Whether to skip URL enrichment for the activity
attr_accessor :skip_enrich_url
# @!attribute skip_push
# @return [Boolean] Whether to skip push notifications
attr_accessor :skip_push
# @!attribute text
# @return [String] Text content of the activity
attr_accessor :text
Expand Down Expand Up @@ -75,12 +81,14 @@ def initialize(attributes = {})
super(attributes)
@type = attributes[:type] || attributes['type']
@feeds = attributes[:feeds] || attributes['feeds']
@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
Expand All @@ -100,12 +108,14 @@ def self.json_field_mappings
{
type: 'type',
feeds: 'feeds',
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',
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/activity_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class ActivityResponse < GetStream::BaseModel
# @!attribute moderation_action
# @return [String]
attr_accessor :moderation_action
# @!attribute selector_source
# @return [String] Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking.
attr_accessor :selector_source
# @!attribute text
# @return [String] Text content of the activity
attr_accessor :text
Expand Down Expand Up @@ -169,6 +172,7 @@ def initialize(attributes = {})
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
@is_watched = attributes[:is_watched] || attributes['is_watched'] || nil
@moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil
@selector_source = attributes[:selector_source] || attributes['selector_source'] || nil
@text = attributes[:text] || attributes['text'] || nil
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil
@current_feed = attributes[:current_feed] || attributes['current_feed'] || nil
Expand Down Expand Up @@ -215,6 +219,7 @@ def self.json_field_mappings
expires_at: 'expires_at',
is_watched: 'is_watched',
moderation_action: 'moderation_action',
selector_source: 'selector_source',
text: 'text',
visibility_tag: 'visibility_tag',
current_feed: 'current_feed',
Expand Down
12 changes: 11 additions & 1 deletion lib/getstream_ruby/generated/models/add_activity_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ class AddActivityRequest < GetStream::BaseModel
# @return [String] Type of activity
attr_accessor :type
# @!attribute feeds
# @return [Array<String>] List of feed IDs to add the activity to
# @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
attr_accessor :feeds
# @!attribute create_notification_activity
# @return [Boolean] Whether to create notification activities for mentioned users
attr_accessor :create_notification_activity
# @!attribute expires_at
# @return [String] Expiration time for the activity
attr_accessor :expires_at
Expand All @@ -33,6 +36,9 @@ class AddActivityRequest < GetStream::BaseModel
# @!attribute skip_enrich_url
# @return [Boolean] Whether to skip URL enrichment for the activity
attr_accessor :skip_enrich_url
# @!attribute skip_push
# @return [Boolean] Whether to skip push notifications
attr_accessor :skip_push
# @!attribute text
# @return [String] Text content of the activity
attr_accessor :text
Expand Down Expand Up @@ -75,12 +81,14 @@ def initialize(attributes = {})
super(attributes)
@type = attributes[:type] || attributes['type']
@feeds = attributes[:feeds] || attributes['feeds']
@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
Expand All @@ -100,12 +108,14 @@ def self.json_field_mappings
{
type: 'type',
feeds: 'feeds',
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',
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/add_activity_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ class AddActivityResponse < GetStream::BaseModel
# @!attribute activity
# @return [ActivityResponse]
attr_accessor :activity
# @!attribute mention_notifications_created
# @return [Integer] Number of mention notification activities created for mentioned users
attr_accessor :mention_notifications_created

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@duration = attributes[:duration] || attributes['duration']
@activity = attributes[:activity] || attributes['activity']
@mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration',
activity: 'activity'
activity: 'activity',
mention_notifications_created: 'mention_notifications_created'
}
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ class AddCommentReactionResponse < GetStream::BaseModel
# @!attribute reaction
# @return [FeedsReactionResponse]
attr_accessor :reaction
# @!attribute notification_created
# @return [Boolean] Whether a notification activity was successfully created
attr_accessor :notification_created

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@duration = attributes[:duration] || attributes['duration']
@comment = attributes[:comment] || attributes['comment']
@reaction = attributes[:reaction] || attributes['reaction']
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration',
comment: 'comment',
reaction: 'reaction'
reaction: 'reaction',
notification_created: 'notification_created'
}
end
end
Expand Down
12 changes: 11 additions & 1 deletion lib/getstream_ruby/generated/models/add_comment_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,29 @@ class AddCommentResponse < GetStream::BaseModel
# @!attribute comment
# @return [CommentResponse]
attr_accessor :comment
# @!attribute mention_notifications_created
# @return [Integer] Number of mention notification activities created for mentioned users
attr_accessor :mention_notifications_created
# @!attribute notification_created
# @return [Boolean] Whether a notification activity was successfully created
attr_accessor :notification_created

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@duration = attributes[:duration] || attributes['duration']
@comment = attributes[:comment] || attributes['comment']
@mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration',
comment: 'comment'
comment: 'comment',
mention_notifications_created: 'mention_notifications_created',
notification_created: 'notification_created'
}
end
end
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/add_reaction_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ class AddReactionResponse < GetStream::BaseModel
# @!attribute reaction
# @return [FeedsReactionResponse]
attr_accessor :reaction
# @!attribute notification_created
# @return [Boolean] Whether a notification activity was successfully created
attr_accessor :notification_created

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@duration = attributes[:duration] || attributes['duration']
@activity = attributes[:activity] || attributes['activity']
@reaction = attributes[:reaction] || attributes['reaction']
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration',
activity: 'activity',
reaction: 'reaction'
reaction: 'reaction',
notification_created: 'notification_created'
}
end
end
Expand Down
Loading
Loading