Class: Vonage::Meetings::Themes
- Inherits:
-
Namespace
- Object
- Namespace
- Vonage::Meetings::Themes
- Extended by:
- T::Sig
- Defined in:
- lib/vonage/meetings/themes.rb
Defined Under Namespace
Classes: ListResponse
Instance Method Summary collapse
- #create(main_color:, brand_text:, **params) ⇒ Response deprecated Deprecated.
- #delete(theme_id:, force: false) ⇒ Response deprecated Deprecated.
- #info(theme_id:) ⇒ Response deprecated Deprecated.
- #list ⇒ ListResponse deprecated Deprecated.
- #list_rooms(theme_id:, **params) ⇒ Response deprecated Deprecated.
- #set_logo(theme_id:, filepath:, logo_type:) ⇒ Response deprecated Deprecated.
- #update(theme_id:, **params) ⇒ Response deprecated Deprecated.
Instance Method Details
#create(main_color:, brand_text:, **params) ⇒ Response
Deprecated.
Create a new theme.
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
)
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.
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 |
#list ⇒ ListResponse
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.
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
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 set_logo(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.
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 |