Class: Telnyx::Resources::Rooms
- Inherits:
-
Object
- Object
- Telnyx::Resources::Rooms
- Defined in:
- lib/telnyx/resources/rooms.rb,
lib/telnyx/resources/rooms/actions.rb,
lib/telnyx/resources/rooms/sessions.rb,
lib/telnyx/resources/rooms/sessions/actions.rb,
sig/telnyx/resources/rooms.rbs,
sig/telnyx/resources/rooms/actions.rbs,
sig/telnyx/resources/rooms/sessions.rbs,
sig/telnyx/resources/rooms/sessions/actions.rbs
Overview
Rooms operations.
Defined Under Namespace
Instance Attribute Summary collapse
-
#actions ⇒ Telnyx::Resources::Rooms::Actions
readonly
Rooms Client Tokens operations.
- #sessions ⇒ Telnyx::Resources::Rooms::Sessions readonly
Instance Method Summary collapse
-
#create(enable_recording: nil, max_participants: nil, unique_name: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::RoomCreateResponse
Some parameter documentations has been truncated, see Models::RoomCreateParams for more details.
-
#delete(room_id, request_options: {}) ⇒ nil
Synchronously delete a Room.
-
#initialize(client:) ⇒ Rooms
constructor
private
A new instance of Rooms.
-
#list(filter: nil, include_sessions: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Room>
Some parameter documentations has been truncated, see Models::RoomListParams for more details.
-
#retrieve(room_id, include_sessions: nil, request_options: {}) ⇒ Telnyx::Models::RoomRetrieveResponse
Returns the room identified by
room_id, including its participant limit, recording and webhook configuration, and active session identifier. -
#update(room_id, enable_recording: nil, max_participants: nil, unique_name: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::RoomUpdateResponse
Some parameter documentations has been truncated, see Models::RoomUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Rooms
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 Rooms.
174 175 176 177 178 |
# File 'lib/telnyx/resources/rooms.rb', line 174 def initialize(client:) @client = client @actions = Telnyx::Resources::Rooms::Actions.new(client: client) @sessions = Telnyx::Resources::Rooms::Sessions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::Rooms::Actions (readonly)
Rooms Client Tokens operations.
9 10 11 |
# File 'lib/telnyx/resources/rooms.rb', line 9 def actions @actions end |
#sessions ⇒ Telnyx::Resources::Rooms::Sessions (readonly)
12 13 14 |
# File 'lib/telnyx/resources/rooms.rb', line 12 def sessions @sessions end |
Instance Method Details
#create(enable_recording: nil, max_participants: nil, unique_name: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::RoomCreateResponse
Some parameter documentations has been truncated, see Models::RoomCreateParams for more details.
Synchronously creates a new video room with the provided configuration and returns the created room.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/telnyx/resources/rooms.rb', line 39 def create(params = {}) parsed, = Telnyx::RoomCreateParams.dump_request(params) @client.request( method: :post, path: "rooms", body: parsed, model: Telnyx::Models::RoomCreateResponse, options: ) end |
#delete(room_id, request_options: {}) ⇒ nil
Synchronously delete a Room. Participants from that room will be kicked out, they won't be able to join that room anymore, and you won't be charged anymore for that room.
162 163 164 165 166 167 168 169 |
# File 'lib/telnyx/resources/rooms.rb', line 162 def delete(room_id, params = {}) @client.request( method: :delete, path: ["rooms/%1$s", room_id], model: NilClass, options: params[:request_options] ) end |
#list(filter: nil, include_sessions: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Room>
Some parameter documentations has been truncated, see Models::RoomListParams for more details.
Returns a paginated list of rooms. Filter the results by creation or update date
and unique name, and use include_sessions to include each room’s sessions.
136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/telnyx/resources/rooms.rb', line 136 def list(params = {}) parsed, = Telnyx::RoomListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "rooms", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Room, options: ) end |
#retrieve(room_id, include_sessions: nil, request_options: {}) ⇒ Telnyx::Models::RoomRetrieveResponse
Returns the room identified by room_id, including its participant limit,
recording and webhook configuration, and active session identifier. Use
include_sessions to include its sessions.
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/telnyx/resources/rooms.rb', line 65 def retrieve(room_id, params = {}) parsed, = Telnyx::RoomRetrieveParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["rooms/%1$s", room_id], query: query, model: Telnyx::Models::RoomRetrieveResponse, options: ) end |
#update(room_id, enable_recording: nil, max_participants: nil, unique_name: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::RoomUpdateResponse
Some parameter documentations has been truncated, see Models::RoomUpdateParams for more details.
Synchronously updates the specified video room's configuration and returns the updated room.
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/telnyx/resources/rooms.rb', line 104 def update(room_id, params = {}) parsed, = Telnyx::RoomUpdateParams.dump_request(params) @client.request( method: :patch, path: ["rooms/%1$s", room_id], body: parsed, model: Telnyx::Models::RoomUpdateResponse, options: ) end |