Class: Telnyx::Resources::RoomParticipants

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

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:



63
64
65
# File 'lib/telnyx/resources/room_participants.rb', line 63

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.

Returns a paginated list of room participants across sessions. Filter participants by session, join, update, or leave date and by participant context.

Parameters:

Returns:

See Also:



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

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

Returns the participant identified by room_participant_id, including its session, context, and join, update, and leave timestamps.

Parameters:

  • room_participant_id (String)

    The unique identifier of a room participant.

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

Returns:

See Also:



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

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