Class: Telnyx::Resources::RoomParticipants

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

Overview

Rooms Participants operations.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RoomParticipants

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

Parameters:



61
62
63
# File 'lib/telnyx/resources/room_participants.rb', line 61

def initialize(client:)
  @client = client
end

Instance Method Details

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

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

View a list of room participants.

Parameters:

Returns:

See Also:



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/telnyx/resources/room_participants.rb', line 45

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

#retrieve(room_participant_id, request_options: {}) ⇒ Telnyx::Models::RoomParticipantRetrieveResponse

View a room participant.

Parameters:

  • room_participant_id (String)

    The unique identifier of a room participant.

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

Returns:

See Also:



18
19
20
21
22
23
24
25
# File 'lib/telnyx/resources/room_participants.rb', line 18

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