Class: Telnyx::Resources::RoomCompositions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/room_compositions.rb

Overview

Rooms Compositions operations.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RoomCompositions

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 RoomCompositions.

Parameters:



118
119
120
# File 'lib/telnyx/resources/room_compositions.rb', line 118

def initialize(client:)
  @client = client
end

Instance Method Details

#create(format_: nil, resolution: nil, session_id: nil, video_layout: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::RoomCompositionCreateResponse

Some parameter documentations has been truncated, see Models::RoomCompositionCreateParams for more details.

Asynchronously create a room composition.

Parameters:

  • format_ (String)

    The desired format of the room composition.

  • resolution (String)

    The desired resolution (width/height in pixels) of the resulting video of the ro

  • session_id (String)

    id of the room session associated with the room composition.

  • video_layout (Hash{Symbol=>Telnyx::Models::VideoRegion})

    Describes the video layout of the room composition in terms of regions.

  • webhook_event_failover_url (String)

    The failover URL where webhooks related to this room composition will be sent if

  • webhook_event_url (String)

    The URL where webhooks related to this room composition will be sent. Must inclu

  • webhook_timeout_secs (Integer)

    Specifies how many seconds to wait before timing out a webhook.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



33
34
35
36
37
38
39
40
41
42
# File 'lib/telnyx/resources/room_compositions.rb', line 33

def create(params = {})
  parsed, options = Telnyx::RoomCompositionCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "room_compositions",
    body: parsed,
    model: Telnyx::Models::RoomCompositionCreateResponse,
    options: options
  )
end

#delete(room_composition_id, request_options: {}) ⇒ nil

Synchronously delete a room composition.

Parameters:

  • room_composition_id (String)

    The unique identifier of a room composition.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



106
107
108
109
110
111
112
113
# File 'lib/telnyx/resources/room_compositions.rb', line 106

def delete(room_composition_id, params = {})
  @client.request(
    method: :delete,
    path: ["room_compositions/%1$s", room_composition_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::RoomComposition>

Some parameter documentations has been truncated, see Models::RoomCompositionListParams for more details.

View a list of room compositions.

Parameters:

Returns:

See Also:



82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/telnyx/resources/room_compositions.rb', line 82

def list(params = {})
  parsed, options = Telnyx::RoomCompositionListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "room_compositions",
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::RoomComposition,
    options: options
  )
end

#retrieve(room_composition_id, request_options: {}) ⇒ Telnyx::Models::RoomCompositionRetrieveResponse

View a room composition.

Parameters:

  • room_composition_id (String)

    The unique identifier of a room composition.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



55
56
57
58
59
60
61
62
# File 'lib/telnyx/resources/room_compositions.rb', line 55

def retrieve(room_composition_id, params = {})
  @client.request(
    method: :get,
    path: ["room_compositions/%1$s", room_composition_id],
    model: Telnyx::Models::RoomCompositionRetrieveResponse,
    options: params[:request_options]
  )
end