Class: Vonage::Meetings::Themes

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

Defined Under Namespace

Classes: ListResponse

Instance Method Summary collapse

Instance Method Details

#create(main_color:, brand_text:, **params) ⇒ Response

Deprecated.

Create a new theme.

Parameters:

  • :main_color (required, String)

    The main color that will be used for the meeting room.

  • :brand_text (required, String)

    The text that will appear on the meeting homepage, in the case that there is no brand image

  • :theme_name (optional, String)

    The name of the theme (must be unique). If null, a UUID will automatically be generated

  • :short_company_url (optional, String)

    The URL that will represent every meeting room with this theme. The value must be unique across Vonage

Returns:

See Also:



59
60
61
62
63
64
65
66
# File 'lib/vonage/meetings/themes.rb', line 59

def create(main_color:, brand_text:, **params)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v1/meetings/themes",
    params: params.merge(main_color: main_color, brand_text: brand_text),
    type: Post
  )
end

#delete(theme_id:, force: false) ⇒ Response

Deprecated.

Delete an existing theme.

a default theme. (Defaults to ‘false`)

Parameters:

  • :theme_id (required, String)

    The id of the theme to be deleted

  • :force. (optional, Boolean)

    Set to ‘true` to force delete a theme currently being used for a room, or as

Returns:

See Also:



112
113
114
115
116
117
118
# File 'lib/vonage/meetings/themes.rb', line 112

def delete(theme_id:, force: false)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v1/meetings/themes/" + theme_id + "?force=#{force}",
    type: Delete
  )
end

#info(theme_id:) ⇒ Response

Deprecated.

Return information for specified theme.

Parameters:

  • theme_id (required, String)

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

Returns:

See Also:



35
36
37
38
# File 'lib/vonage/meetings/themes.rb', line 35

def info(theme_id:)
  logger.info('This method is deprecated and will be removed in a future release.')
  request("/v1/meetings/themes/" + theme_id)
end

#listListResponse

Deprecated.

Get a list of themes associated with the Vonage application.



21
22
23
24
# File 'lib/vonage/meetings/themes.rb', line 21

def list
  logger.info('This method is deprecated and will be removed in a future release.')
  request("/v1/meetings/themes", response_class: ListResponse)
end

#list_rooms(theme_id:, **params) ⇒ Response

Deprecated.

Get a list of rooms that are associated with a theme id.

Parameters:

  • theme_id (required, String)

    THe ID of the theme to search for rooms associated with.

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

Returns:

See Also:



135
136
137
138
139
140
141
# File 'lib/vonage/meetings/themes.rb', line 135

def list_rooms(theme_id:, **params)
  logger.info('This method is deprecated and will be removed in a future release.')
  path = "/v1/meetings/themes/" + theme_id + "/rooms"
  path += "?#{Params.encode(params)}" unless params.empty?

  request(path, response_class: Meetings::Rooms::ListResponse)
end

#set_logo(theme_id:, filepath:, logo_type:) ⇒ Response

Deprecated.

Set a logo for a theme.

TODO: add type signature

Parameters:

  • :theme_id (required, String)

    The ID of the theme for which the logo should be set

  • :filepath (required, String)

    The filepath of the logo file. Logo files must conform to the following requirements:

    - Format: PNG
    - Maximum size: 1MB
    - Background must be transparent
    - Dimensions:
      - 1 px - 300 px (`white` and `colored` logos)
      - 16 x 16 - 32 x 32 and must be square (favicon)
    
  • :logo_type (required, String)

    The type of logo to be set. Must be one of ‘white`, `colored`, `favicon`

Returns:

Raises:

  • (ArgumentError)

See Also:



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/vonage/meetings/themes.rb', line 168

def (theme_id:, filepath:, logo_type:)
  logger.info('This method is deprecated and will be removed in a future release.')
  pn = Pathname.new(filepath)
  valid_logo_types = ['white', 'colored', 'favicon']
  raise ArgumentError, ':filepath not for a file' unless pn.file?
  raise ArgumentError, 'file at :filepath not readable' unless pn.readable?
  raise ArgumentError, "logo_type: must be one of #{valid_logo_types}" unless valid_logo_types.include?(logo_type)

  logo_upload_credentials = get_logo_upload_credentials

  filtered_logo_upload_credentials = logo_upload_credentials.select {|cred| cred.fields.logo_type == logo_type }.first

  upload_logo_file(filepath: filepath, credentials: filtered_logo_upload_credentials)

  finalize_logos(theme_id: theme_id, keys: [filtered_logo_upload_credentials.fields.key])
end

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

Deprecated.

Update an existing theme.

Parameters:

  • theme_id (required, String)

    The id of the theme to be updated

  • :main_color (required, String)

    The main color that will be used for the meeting room.

  • :brand_text (required, String)

    The text that will appear on the meeting homepage, in the case that there is no brand image

  • :theme_name (optional, String)

    The name of the theme (must be unique). If null, a UUID will automatically be generated

  • :short_company_url (optional, String)

    The URL that will represent every meeting room with this theme. The value must be unique across Vonage

Returns:

See Also:



89
90
91
92
93
94
95
96
97
98
# File 'lib/vonage/meetings/themes.rb', line 89

def update(theme_id:, **params)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v1/meetings/themes/" + theme_id,
    params: {
      update_details: params
    },
    type: Patch
  )
end