Skip to content
Closed
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
63 changes: 63 additions & 0 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,69 @@ def query_comments(query_comments_request)
)
end

# Deletes a bookmark from a comment
#
# @param comment_id [String]
# @param folder_id [String]
# @param user_id [String]
# @return [Models::DeleteCommentBookmarkResponse]
def delete_comment_bookmark(comment_id, folder_id = nil, user_id = nil)
path = '/api/v2/feeds/comments/{comment_id}/bookmarks'
# Replace path parameters
path = path.gsub('{comment_id}', comment_id.to_s)
# Build query parameters
query_params = {}
query_params['folder_id'] = folder_id unless folder_id.nil?
query_params['user_id'] = user_id unless user_id.nil?

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

# Updates a bookmark for a comment
#
# @param comment_id [String]
# @param update_comment_bookmark_request [UpdateCommentBookmarkRequest]
# @return [Models::UpdateCommentBookmarkResponse]
def update_comment_bookmark(comment_id, update_comment_bookmark_request)
path = '/api/v2/feeds/comments/{comment_id}/bookmarks'
# Replace path parameters
path = path.gsub('{comment_id}', comment_id.to_s)
# Build request body
body = update_comment_bookmark_request

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

# Adds a bookmark to a comment
#
# @param comment_id [String]
# @param add_comment_bookmark_request [AddCommentBookmarkRequest]
# @return [Models::AddCommentBookmarkResponse]
def add_comment_bookmark(comment_id, add_comment_bookmark_request)
path = '/api/v2/feeds/comments/{comment_id}/bookmarks'
# Replace path parameters
path = path.gsub('{comment_id}', comment_id.to_s)
# Build request body
body = add_comment_bookmark_request

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

# Deletes a comment from an object (e.g., activity) and broadcasts appropriate events
#
# @param _id [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/getstream_ruby/generated/models/activity_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ActivityRequest < GetStream::BaseModel
# @return [Object] Custom data for the activity
attr_accessor :custom
# @!attribute location
# @return [ActivityLocation]
# @return [Location]
attr_accessor :location
# @!attribute search_data
# @return [Object] Additional data for search indexing
Expand Down
2 changes: 1 addition & 1 deletion lib/getstream_ruby/generated/models/activity_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class ActivityResponse < GetStream::BaseModel
# @return [FeedResponse]
attr_accessor :current_feed
# @!attribute location
# @return [ActivityLocation]
# @return [Location]
attr_accessor :location
# @!attribute metrics
# @return [Hash<String, Integer>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class AddActivityRequest < GetStream::BaseModel
# @return [Object] Custom data for the activity
attr_accessor :custom
# @!attribute location
# @return [ActivityLocation]
# @return [Location]
attr_accessor :location
# @!attribute search_data
# @return [Object] Additional data for search indexing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class AddCommentBookmarkRequest < GetStream::BaseModel

# Model attributes
# @!attribute folder_id
# @return [String] ID of the folder to add the bookmark to
attr_accessor :folder_id
# @!attribute user_id
# @return [String]
attr_accessor :user_id
# @!attribute custom
# @return [Object] Custom data for the bookmark
attr_accessor :custom
# @!attribute new_folder
# @return [AddFolderRequest]
attr_accessor :new_folder
# @!attribute user
# @return [UserRequest]
attr_accessor :user

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@folder_id = attributes[:folder_id] || attributes['folder_id'] || nil
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@custom = attributes[:custom] || attributes['custom'] || nil
@new_folder = attributes[:new_folder] || attributes['new_folder'] || nil
@user = attributes[:user] || attributes['user'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
folder_id: 'folder_id',
user_id: 'user_id',
custom: 'custom',
new_folder: 'new_folder',
user: 'user'
}
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class AddCommentBookmarkResponse < GetStream::BaseModel

# Model attributes
# @!attribute duration
# @return [String]
attr_accessor :duration
# @!attribute bookmark
# @return [BookmarkResponse]
attr_accessor :bookmark

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

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration',
bookmark: 'bookmark'
}
end
end
end
end
end
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/aggregation_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module Models
class AggregationConfig < GetStream::BaseModel

# Model attributes
# @!attribute activities_sort
# @return [String] Order of member activities inside each aggregated group for non-stories feeds: created_at_desc (newest first, default) or created_at_asc (oldest first). Stories feeds ignore this and always use oldest first.
attr_accessor :activities_sort
# @!attribute format
# @return [String] Format for activity aggregation
attr_accessor :format
Expand All @@ -19,13 +22,15 @@ class AggregationConfig < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@activities_sort = attributes[:activities_sort] || attributes['activities_sort'] || nil
@format = attributes[:format] || attributes['format'] || nil
@score_strategy = attributes[:score_strategy] || attributes['score_strategy'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
activities_sort: 'activities_sort',
format: 'format',
score_strategy: 'score_strategy'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module Models
class BanActionRequestPayload < GetStream::BaseModel

# Model attributes
# @!attribute ban_from_future_channels
# @return [Boolean] Also ban user from all channels this moderator creates in the future
attr_accessor :ban_from_future_channels
# @!attribute channel_ban_only
# @return [Boolean] Ban only from specific channel
attr_accessor :channel_ban_only
Expand Down Expand Up @@ -37,6 +40,7 @@ class BanActionRequestPayload < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@ban_from_future_channels = attributes[:ban_from_future_channels] || attributes['ban_from_future_channels'] || nil
@channel_ban_only = attributes[:channel_ban_only] || attributes['channel_ban_only'] || nil
@channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil
@delete_messages = attributes[:delete_messages] || attributes['delete_messages'] || nil
Expand All @@ -50,6 +54,7 @@ def initialize(attributes = {})
# Override field mappings for JSON serialization
def self.json_field_mappings
{
ban_from_future_channels: 'ban_from_future_channels',
channel_ban_only: 'channel_ban_only',
channel_cid: 'channel_cid',
delete_messages: 'delete_messages',
Expand Down
20 changes: 20 additions & 0 deletions lib/getstream_ruby/generated/models/bookmark_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ module Models
class BookmarkResponse < GetStream::BaseModel

# Model attributes
# @!attribute _object_id
# @return [String] ID of the bookmarked object
attr_accessor :_object_id
# @!attribute created_at
# @return [DateTime] When the bookmark was created
attr_accessor :created_at
# @!attribute object_type
# @return [String] Type of the bookmarked object (activity or comment)
attr_accessor :object_type
# @!attribute updated_at
# @return [DateTime] When the bookmark was last updated
attr_accessor :updated_at
Expand All @@ -21,6 +27,12 @@ class BookmarkResponse < GetStream::BaseModel
# @!attribute user
# @return [UserResponse]
attr_accessor :user
# @!attribute activity_id
# @return [String]
attr_accessor :activity_id
# @!attribute comment
# @return [CommentResponse]
attr_accessor :comment
# @!attribute custom
# @return [Object] Custom data for the bookmark
attr_accessor :custom
Expand All @@ -31,21 +43,29 @@ class BookmarkResponse < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@_object_id = attributes[:_object_id] || attributes['object_id']
@created_at = attributes[:created_at] || attributes['created_at']
@object_type = attributes[:object_type] || attributes['object_type']
@updated_at = attributes[:updated_at] || attributes['updated_at']
@activity = attributes[:activity] || attributes['activity']
@user = attributes[:user] || attributes['user']
@activity_id = attributes[:activity_id] || attributes['activity_id'] || nil
@comment = attributes[:comment] || attributes['comment'] || nil
@custom = attributes[:custom] || attributes['custom'] || nil
@folder = attributes[:folder] || attributes['folder'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
_object_id: 'object_id',
created_at: 'created_at',
object_type: 'object_type',
updated_at: 'updated_at',
activity: 'activity',
user: 'user',
activity_id: 'activity_id',
comment: 'comment',
custom: 'custom',
folder: 'folder'
}
Expand Down
31 changes: 31 additions & 0 deletions lib/getstream_ruby/generated/models/bypass_action_request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class BypassActionRequest < GetStream::BaseModel

# Model attributes
# @!attribute enabled
# @return [Boolean]
attr_accessor :enabled

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

# Override field mappings for JSON serialization
def self.json_field_mappings
{
enabled: 'enabled'
}
end
end
end
end
end
36 changes: 36 additions & 0 deletions lib/getstream_ruby/generated/models/bypass_request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class BypassRequest < GetStream::BaseModel

# Model attributes
# @!attribute enabled
# @return [Boolean] Whether to enable moderation bypass for this user
attr_accessor :enabled
# @!attribute target_user_id
# @return [String] ID of the user to update
attr_accessor :target_user_id

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@enabled = attributes[:enabled] || attributes['enabled']
@target_user_id = attributes[:target_user_id] || attributes['target_user_id']
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
enabled: 'enabled',
target_user_id: 'target_user_id'
}
end
end
end
end
end
31 changes: 31 additions & 0 deletions lib/getstream_ruby/generated/models/bypass_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class BypassResponse < GetStream::BaseModel

# Model attributes
# @!attribute duration
# @return [String]
attr_accessor :duration

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

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration'
}
end
end
end
end
end
Loading
Loading