Class: Telnyx::Resources::Rooms::Sessions::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/rooms/sessions/actions.rb

Overview

Rooms Sessions operations.

Instance Method Summary collapse

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.

Parameters:



119
120
121
# File 'lib/telnyx/resources/rooms/sessions/actions.rb', line 119

def initialize(client:)
  @client = client
end

Instance Method Details

#end_(room_session_id, request_options: {}) ⇒ Telnyx::Models::Rooms::Sessions::ActionEndResponse

Note: this will also kick all participants currently present in the room

Parameters:

  • room_session_id (String)

    The unique identifier of a room session.

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

Returns:

See Also:



20
21
22
23
24
25
26
27
# File 'lib/telnyx/resources/rooms/sessions/actions.rb', line 20

def end_(room_session_id, params = {})
  @client.request(
    method: :post,
    path: ["room_sessions/%1$s/actions/end", room_session_id],
    model: Telnyx::Models::Rooms::Sessions::ActionEndResponse,
    options: params[:request_options]
  )
end

#kick(room_session_id, exclude: nil, participants: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::Sessions::ActionKickResponse

Some parameter documentations has been truncated, see Models::Rooms::Sessions::ActionKickParams for more details.

Kick participants from a room session.

Parameters:

Returns:

See Also:



47
48
49
50
51
52
53
54
55
56
# File 'lib/telnyx/resources/rooms/sessions/actions.rb', line 47

def kick(room_session_id, params = {})
  parsed, options = Telnyx::Rooms::Sessions::ActionKickParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["room_sessions/%1$s/actions/kick", room_session_id],
    body: parsed,
    model: Telnyx::Models::Rooms::Sessions::ActionKickResponse,
    options: options
  )
end

#mute(room_session_id, exclude: nil, participants: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::Sessions::ActionMuteResponse

Some parameter documentations has been truncated, see Models::Rooms::Sessions::ActionMuteParams for more details.

Mute participants in room session.

Parameters:

Returns:

See Also:



76
77
78
79
80
81
82
83
84
85
# File 'lib/telnyx/resources/rooms/sessions/actions.rb', line 76

def mute(room_session_id, params = {})
  parsed, options = Telnyx::Rooms::Sessions::ActionMuteParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["room_sessions/%1$s/actions/mute", room_session_id],
    body: parsed,
    model: Telnyx::Models::Rooms::Sessions::ActionMuteResponse,
    options: options
  )
end

#unmute(room_session_id, exclude: nil, participants: nil, request_options: {}) ⇒ Telnyx::Models::Rooms::Sessions::ActionUnmuteResponse

Some parameter documentations has been truncated, see Models::Rooms::Sessions::ActionUnmuteParams for more details.

Unmute participants in room session.

Parameters:

Returns:

See Also:



105
106
107
108
109
110
111
112
113
114
# File 'lib/telnyx/resources/rooms/sessions/actions.rb', line 105

def unmute(room_session_id, params = {})
  parsed, options = Telnyx::Rooms::Sessions::ActionUnmuteParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["room_sessions/%1$s/actions/unmute", room_session_id],
    body: parsed,
    model: Telnyx::Models::Rooms::Sessions::ActionUnmuteResponse,
    options: options
  )
end