Class: Aws::Ivschat::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Ivschat::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb
Overview
An API client for Ivschat. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::Ivschat::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_chat_token(params = {}) ⇒ Types::CreateChatTokenResponse
Creates an encrypted token that is used to establish an individual WebSocket connection to a room.
-
#create_room(params = {}) ⇒ Types::CreateRoomResponse
Creates a room that allows clients to connect and pass messages.
-
#delete_message(params = {}) ⇒ Types::DeleteMessageResponse
Sends an event to a specific room which directs clients to delete a specific message; that is, unrender it from view and delete it from the client’s chat history.
-
#delete_room(params = {}) ⇒ Struct
Deletes the specified room.
-
#disconnect_user(params = {}) ⇒ Struct
Disconnects all connections using a specified user ID from a room.
-
#get_room(params = {}) ⇒ Types::GetRoomResponse
Gets the specified room.
-
#list_rooms(params = {}) ⇒ Types::ListRoomsResponse
Gets summary information about all your rooms in the AWS region where the API request is processed.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Gets information about AWS tags for the specified ARN.
-
#send_event(params = {}) ⇒ Types::SendEventResponse
Sends an event to a room.
-
#tag_resource(params = {}) ⇒ Struct
Adds or updates tags for the AWS resource with the specified ARN.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from the resource with the specified ARN.
-
#update_room(params = {}) ⇒ Types::UpdateRoomResponse
Updates a room’s configuration.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
348 349 350 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 348 def initialize(*args) super end |
Instance Method Details
#create_chat_token(params = {}) ⇒ Types::CreateChatTokenResponse
Creates an encrypted token that is used to establish an individual WebSocket connection to a room. The token is valid for one minute, and a connection (session) established with the token is valid for the specified duration.
Encryption keys are owned by Amazon IVS Chat and never used directly by your application.
412 413 414 415 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 412 def create_chat_token(params = {}, = {}) req = build_request(:create_chat_token, params) req.send_request() end |
#create_room(params = {}) ⇒ Types::CreateRoomResponse
Creates a room that allows clients to connect and pass messages.
483 484 485 486 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 483 def create_room(params = {}, = {}) req = build_request(:create_room, params) req.send_request() end |
#delete_message(params = {}) ⇒ Types::DeleteMessageResponse
Sends an event to a specific room which directs clients to delete a
specific message; that is, unrender it from view and delete it from
the client’s chat history. This event’s EventName
is
aws:DELETE_MESSAGE
. This replicates the DeleteMessage
WebSocket operation in the Amazon IVS Chat Messaging API.
534 535 536 537 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 534 def (params = {}, = {}) req = build_request(:delete_message, params) req.send_request() end |
#delete_room(params = {}) ⇒ Struct
Deletes the specified room.
556 557 558 559 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 556 def delete_room(params = {}, = {}) req = build_request(:delete_room, params) req.send_request() end |
#disconnect_user(params = {}) ⇒ Struct
Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.
593 594 595 596 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 593 def disconnect_user(params = {}, = {}) req = build_request(:disconnect_user, params) req.send_request() end |
#get_room(params = {}) ⇒ Types::GetRoomResponse
Gets the specified room.
640 641 642 643 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 640 def get_room(params = {}, = {}) req = build_request(:get_room, params) req.send_request() end |
#list_rooms(params = {}) ⇒ Types::ListRoomsResponse
Gets summary information about all your rooms in the AWS region where
the API request is processed. Results are sorted in descending order
of updateTime
.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
696 697 698 699 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 696 def list_rooms(params = {}, = {}) req = build_request(:list_rooms, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Gets information about AWS tags for the specified ARN.
725 726 727 728 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 725 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#send_event(params = {}) ⇒ Types::SendEventResponse
Sends an event to a room. Use this within your application’s business logic to send events to clients of a room; e.g., to notify clients to change the way the chat UI is rendered.
767 768 769 770 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 767 def send_event(params = {}, = {}) req = build_request(:send_event, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds or updates tags for the AWS resource with the specified ARN.
795 796 797 798 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 795 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from the resource with the specified ARN.
821 822 823 824 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 821 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_room(params = {}) ⇒ Types::UpdateRoomResponse
Updates a room’s configuration.
891 892 893 894 |
# File 'gems/aws-sdk-ivschat/lib/aws-sdk-ivschat/client.rb', line 891 def update_room(params = {}, = {}) req = build_request(:update_room, params) req.send_request() end |