Skip to content
Open
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
1 change: 1 addition & 0 deletions lib/getstream_ruby/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
require 'logger'
require 'json'
require 'jwt'
require_relative 'multipart_request'
require_relative 'generated/base_model'
require_relative 'generated/common_client'
require_relative 'generated/feeds_client'
Expand Down
103 changes: 99 additions & 4 deletions lib/getstream_ruby/generated/chat_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def query_channels(query_channels_request)
)
end

# Update channels in batchSends events:- channel.frozen- channel.hidden- channel.unfrozen- channel.updated- channel.visible- member.added- member.removed- member.updated
# Update channels in batch. By default returns task_id for an asynchronous task. With synchronous: true, updateData accepts at most 100 explicit CIDs and returns a positive success_channels_count of channels selected for update after the database write completes, without task_id. Always poll a returned task_id, including when an older node ignores synchronous.Sends events:- channel.frozen- channel.hidden- channel.unfrozen- channel.updated- channel.visible- member.added- member.removed- member.updated
#
# @param channel_batch_update_request [ChannelBatchUpdateRequest]
# @return [Models::ChannelBatchUpdateResponse]
Expand Down Expand Up @@ -384,6 +384,28 @@ def update_channel(_type, _id, update_channel_request)
)
end

# Lists the users banned from a channel, by a ban on the channel or by a future channel ban issued by the channel's creator, with one entry per user
#
# @param _type [String]
# @param _id [String]
# @param query_channel_bans_request [QueryChannelBansRequest]
# @return [Models::QueryChannelBansResponse]
def query_channel_bans(_type, _id, query_channel_bans_request)
path = '/api/v2/chat/channels/{type}/{id}/bans/query'
# Replace path parameters
path = path.gsub('{type}', _type.to_s)
path = path.gsub('{id}', _id.to_s)
# Build request body
body = query_channel_bans_request

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

# Deletes a draftSends events:- draft.deleted
#
# @param _type [String]
Expand Down Expand Up @@ -595,7 +617,7 @@ def update_member_partial(_type, _id, update_member_partial_request, user_id = n
)
end

# Sends new message to the specified channelSends events:- channel.visible- message.new- message.updated
# Sends new message to the specified channelSends events:- channel.visible- message.new- message.updated- scheduled_message.created
#
# @param _type [String]
# @param _id [String]
Expand Down Expand Up @@ -1376,7 +1398,7 @@ def delete_reminder(message_id, user_id = nil)
)
end

# Updates an existing reminderSends events:- reminder.updated
# Updates an existing reminder. remind_at and expires_at are both replaced on every call: omitting either one clears itSends events:- reminder.updated
#
# @param message_id [String]
# @param update_reminder_request [UpdateReminderRequest]
Expand All @@ -1396,7 +1418,7 @@ def update_reminder(message_id, update_reminder_request)
)
end

# Creates a new reminderSends events:- reminder.created
# Creates a new reminder. An optional expires_at hides the reminder from every read once it passes and stops it counting against the per-user reminder capSends events:- reminder.created
#
# @param message_id [String]
# @param create_reminder_request [CreateReminderRequest]
Expand Down Expand Up @@ -1709,6 +1731,79 @@ def get_retention_policy_runs(get_retention_policy_runs_request)
)
end

# Lists the scheduled messages of one user across channels: pending ones first, then failed ones, each by scheduled_at. Client-side requests return the caller's own; server-side requests require user_id
#
# @param query_scheduled_messages_request [QueryScheduledMessagesRequest]
# @return [Models::QueryScheduledMessagesResponse]
def query_scheduled_messages(query_scheduled_messages_request)
path = '/api/v2/chat/scheduled_messages/query'
# Build request body
body = query_scheduled_messages_request

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

# Cancels a scheduled message so it is never sent, or removes a failed one. Returns 409 while the message is being sentSends events:- scheduled_message.deleted
#
# @param _id [String]
# @return [Models::DeleteScheduledMessageResponse]
def delete_scheduled_message(_id)
path = '/api/v2/chat/scheduled_messages/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)

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

# Replaces the message and/or the send time of a scheduled message. The scheduling checks run again, and the message is then sent, under the caller's auth mode. A request that changes only scheduled_at keeps the auth mode the message was scheduled with. Returns 409 while the message is being sentSends events:- scheduled_message.updated
#
# @param _id [String]
# @param update_scheduled_message_request [UpdateScheduledMessageRequest]
# @return [Models::UpdateScheduledMessageResponse]
def update_scheduled_message(_id, update_scheduled_message_request)
path = '/api/v2/chat/scheduled_messages/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build request body
body = update_scheduled_message_request

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

# Moves the send time of a scheduled message to now and queues the send. Every send check runs when it is sent. Returns 409 while the message is being sentSends events:- scheduled_message.updated
#
# @param _id [String]
# @param send_scheduled_message_now_request [SendScheduledMessageNowRequest]
# @return [Models::SendScheduledMessageNowResponse]
def send_scheduled_message_now(_id, send_scheduled_message_now_request)
path = '/api/v2/chat/scheduled_messages/{id}/send_now'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build request body
body = send_scheduled_message_now_request

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

# Search messages across channels
#
# @param payload [SearchPayload]
Expand Down
26 changes: 24 additions & 2 deletions lib/getstream_ruby/generated/common_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,23 @@ def update_block_list(name, update_block_list_request)
)
end

# Validates that Stream can publish to a customer-owned GCP Pub/Sub topic
#
# @param check_gcp_pub_sub_request [CheckGCPPubSubRequest]
# @return [Models::CheckGCPPubSubResponse]
def check_gcp_pub_sub(check_gcp_pub_sub_request)
path = '/api/v2/check_gcp_pubsub'
# Build request body
body = check_gcp_pub_sub_request

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

# Sends a test message via push, this is a test endpoint to verify your push settings
#
# @param check_push_request [CheckPushRequest]
Expand Down Expand Up @@ -874,17 +891,22 @@ def delete_poll_option(poll_id, option_id, user_id = nil)
#
# @param poll_id [String]
# @param option_id [String]
# @param user_id [String]
# @return [Models::PollOptionResponse]
def get_poll_option(poll_id, option_id)
def get_poll_option(poll_id, option_id, user_id = nil)
path = '/api/v2/polls/{poll_id}/options/{option_id}'
# Replace path parameters
path = path.gsub('{poll_id}', poll_id.to_s)
path = path.gsub('{option_id}', option_id.to_s)
# Build query parameters
query_params = {}
query_params['user_id'] = user_id unless user_id.nil?

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

Expand Down
Loading
Loading