Class: Vonage::Meetings::Rooms

Inherits:
Namespace
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/vonage/meetings/rooms.rb

Defined Under Namespace

Classes: ListResponse

Instance Method Summary collapse

Instance Method Details

#create(display_name:, **params) ⇒ Response

Create a new room.

Parameters:

  • :display_name (required, String)
  • :metadata (optional, String)

    Free text that can be attached to a room. This will be passed in the form of a header in events related to this room.

  • :type (optional, String)

    The type of room. Must be one of instant (the default) or long_term.

  • :expires_at (String(date))

    The time for when the room will be expired, expressed in ISO 8601 format. The value must be greater than 10 minutes from now. Must be set if type is long_term. Should not be set if type is instant

  • :expire_after_use (optional, Boolean)

    Close the room after a session ends. Only relevant for rooms where the type is long_term

  • :theme_id (optional, string(uuid))

    When specified, the meeting room will use the theme indicated by the ID.

  • :join_approval_level (optional, String)

    The level of approval needed to join the meeting in the room. Must be one of: none, after_owner_only, explicit_approval

  • :recording_options (optional, Hash)

    @option :recording_options [Boolean] :auto_record Automatically record all sessions in this room. Recording cannot be stopped when this is set to true. @option :recording_options [Boolean] :record_only_owner Record only the owner screen or any share screen of the video.

  • :initial_join_options (optional, Hash)

    @option :initial_join_options [String] :microphone_state Set the default microphone option for users in the pre-join screen of this room. Must be one of: on, off, default

  • :callback_urls (optional, Hash)

    Provides callback URLs to listen to events. If specified, over-rides the callback URLs specified at Application-level @option :callback_urls [String] :rooms_callback_url Callback url for rooms events @option :callback_urls [String] :sessions_callback_url Callback url for sessions events @option :callback_urls [String] :recordings_callback_url Callback url for recordings events

  • :available_features (optional, Hash)

    @option :available_features [Boolean] :is_recording_available Determine if recording feature is available in the UI (default true) @option :available_features [Boolean] :is_chat_available Determine if chat feature is available in the UI (default true) @option :available_features [Boolean] :is_whiteboard_available Determine if whiteboard feature is available in the UI (default true) @option :available_features [Boolean] :is_locale_switcher_available Determine if locale switche feature is available in the UI (default true) @option :available_features [Boolean] :is_captions_available Determine if captions feature is available in the UI

  • :ui_settings (optional, Hash)

    Provides options to customize the user interface @option :ui_settings [String] :language The desired language of the UI. The default is en (English). Must be one of: en, fr, de, es, pt, ca, he

Returns:

See Also:



97
98
99
100
101
102
103
# File 'lib/vonage/meetings/rooms.rb', line 97

def create(display_name:, **params)
  request(
    "/v1/meetings/rooms",
    params: params.merge({ display_name: display_name }),
    type: Post
  )
end

#info(room_id:) ⇒ Response

Return information for specified room.

Parameters:

  • room_id (required, String)

    The id of the room for which the info should be returned

Returns:

See Also:



40
41
42
# File 'lib/vonage/meetings/rooms.rb', line 40

def info(room_id:)
  request("/v1/meetings/rooms/" + room_id)
end

#list(**params) ⇒ ListResponse

Get a list of rooms associated with the Vonage application.

Parameters:

  • :start_id (optional, Integer)
  • :end_id (optional, Integer)
  • :page_size (optional, Integer)

Returns:

See Also:



25
26
27
28
29
30
# File 'lib/vonage/meetings/rooms.rb', line 25

def list(**params)
  path = "/v1/meetings/rooms"
  path += "?#{Params.encode(params)}" unless params.empty?

  request(path, response_class: ListResponse)
end

#update(room_id:, **params) ⇒ Response

Update an existing room. Although paramaters (other than room_id) are optional, at least one other parameter must be provided or an error response will be received.

Parameters:

  • room_id (required, String)

    The ID of the Room to be updated

  • :expires_at (optional, String(date))

    The time for when the room will be expired, expressed in ISO 8601 format. Only relevant for rooms where the type is long_term`

  • :expire_after_use (optional, Boolean)

    Close the room after a session ends. Only relevant for rooms where the type is long_term

  • :theme_id (optional, string(uuid))

    When specified, the meeting room will use the theme indicated by the ID.

  • :join_approval_level (optional, String)

    The level of approval needed to join the meeting in the room. Must be one of: none, after_owner_only, explicit_approval

  • :initial_join_options (optional, Hash)

    @option :initial_join_options [String] :microphone_state Set the default microphone option for users in the pre-join screen of this room. Must be one of: on, off, default

  • :callback_urls (optional, Hash)

    Provides callback URLs to listen to events. If specified, over-rides the callback URLs specified at Application-level @option :callback_urls [String] :rooms_callback_url Callback url for rooms events @option :callback_urls [String] :sessions_callback_url Callback url for sessions events @option :callback_urls [String] :recordings_callback_url Callback url for recordings events

  • :available_features (optional, Hash)

    @option :available_features [Boolean] :is_recording_available Determine if recording feature is available in the UI (default true) @option :available_features [Boolean] :is_chat_available Determine if chat feature is available in the UI (default true) @option :available_features [Boolean] :is_whiteboard_available Determine if whiteboard feature is available in the UI (default true) @option :available_features [Boolean] :is_locale_switcher_available Determine if locale switche feature is available in the UI (default true) @option :available_features [Boolean] :is_captions_available Determine if captions feature is available in the UI

Returns:

Raises:

  • (ArgumentError)

See Also:



144
145
146
147
148
149
150
151
152
153
# File 'lib/vonage/meetings/rooms.rb', line 144

def update(room_id:, **params)
  raise ArgumentError, 'must provide at least one other param in addition to :room_id' if params.empty?
  request(
    "/v1/meetings/rooms/" + room_id,
    params: {
      update_details: params
    },
    type: Patch
  )
end