Class: Telnyx::Resources::Rooms::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::Rooms::Actions
- Defined in:
- lib/telnyx/resources/rooms/actions.rb
Overview
Rooms Client Tokens operations.
Instance Method Summary collapse
-
#generate_join_client_token(room_id, refresh_token_ttl_secs: nil, token_ttl_secs: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::ActionGenerateJoinClientTokenResponse
Some parameter documentations has been truncated, see Models::Rooms::ActionGenerateJoinClientTokenParams for more details.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#refresh_client_token(room_id, refresh_token:, token_ttl_secs: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::ActionRefreshClientTokenResponse
Some parameter documentations has been truncated, see Models::Rooms::ActionRefreshClientTokenParams for more details.
Constructor Details
#initialize(client:) ⇒ Actions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Actions.
73 74 75 |
# File 'lib/telnyx/resources/rooms/actions.rb', line 73 def initialize(client:) @client = client end |
Instance Method Details
#generate_join_client_token(room_id, refresh_token_ttl_secs: nil, token_ttl_secs: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::ActionGenerateJoinClientTokenResponse
Some parameter documentations has been truncated, see Models::Rooms::ActionGenerateJoinClientTokenParams for more details.
Synchronously create an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after ‘token_ttl_secs`, a Refresh Token is also provided to refresh a Client Token, the Refresh Token expires after `refresh_token_ttl_secs`.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/telnyx/resources/rooms/actions.rb', line 29 def generate_join_client_token(room_id, params = {}) parsed, = Telnyx::Rooms::ActionGenerateJoinClientTokenParams.dump_request(params) @client.request( method: :post, path: ["rooms/%1$s/actions/generate_join_client_token", room_id], body: parsed, model: Telnyx::Models::Rooms::ActionGenerateJoinClientTokenResponse, options: ) end |
#refresh_client_token(room_id, refresh_token:, token_ttl_secs: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::ActionRefreshClientTokenResponse
Some parameter documentations has been truncated, see Models::Rooms::ActionRefreshClientTokenParams for more details.
Synchronously refresh an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after ‘token_ttl_secs`.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/telnyx/resources/rooms/actions.rb', line 59 def refresh_client_token(room_id, params) parsed, = Telnyx::Rooms::ActionRefreshClientTokenParams.dump_request(params) @client.request( method: :post, path: ["rooms/%1$s/actions/refresh_client_token", room_id], body: parsed, model: Telnyx::Models::Rooms::ActionRefreshClientTokenResponse, options: ) end |