Skip to content

Commit 2edf796

Browse files
authored
DEVX-8720/DEVX-8686: Numbers, Meetings, and Proactive Connect maintenance (#314)
* Updating code comments for Numbers API implementation * Adding deprecation warnings to Proactive Connect API implementation * Adding deprecation warnings to Meetings API implementation * Fixing links in README
1 parent 9327396 commit 2edf796

15 files changed

+136
-24
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ client = Vonage::Client.new(application_id: application_id, private_key: private
8383
```
8484

8585
Both arguments should have string values corresponding to the `id` and `private_key`
86-
values returned in a ["create an application"](https://developer.nexmo.com/api/application.v2#createApplication)
86+
values returned in a ["create an application"](https://developer.vonage.com/api/application.v2#createApplication)
8787
response. These credentials can be stored in a datastore, in environment variables,
8888
on disk outside of source control, or in some kind of key management infrastructure.
8989

@@ -104,8 +104,8 @@ token = Vonage::JWT.generate(claims)
104104
client = Vonage::Client.new(token: token)
105105
```
106106

107-
Documentation for the Vonage Ruby JWT generator gem can be found at
108-
[https://www.rubydoc.info/github/nexmo/nexmo-jwt-ruby](https://www.rubydoc.info/github/nexmo/nexmo-jwt-ruby).
107+
Documentation for the Vonage Ruby JWT generator gem can be found at: https://www.rubydoc.info/gems/vonage-jwt
108+
109109
The documentation outlines all the possible parameters you can use to customize and build a token with.
110110

111111
### Logging
@@ -179,9 +179,6 @@ client = Vonage::Client.new(
179179

180180
By default the hosts are set to `api.nexmo.com` and `rest.nexmo.com`, respectively.
181181

182-
183-
184-
185182
### Webhook signatures
186183

187184
Certain Vonage APIs provide signed [webhooks](https://developer.vonage.com/en/getting-started/concepts/webhooks) as a means of verifying the origin of the webhooks. The exact signing mechanism varies depending on the API.
@@ -300,10 +297,10 @@ Vonage APIs paginate list requests. This means that if a collection is requested
300297

301298
The `auto_advance` parameter is set to a default of `true` for the following APIs:
302299

303-
* [Account API](https://developer.nexmo.com/api/developer/account)
304-
* [Application API](https://developer.nexmo.com/api/application.v2)
305-
* [Conversation API](https://developer.nexmo.com/api/conversation)
306-
* [Voice API](https://developer.nexmo.com/api/voice)
300+
* [Account API](https://developer.vonage.com/api/developer/account)
301+
* [Application API](https://developer.vonage.com/api/application.v2)
302+
* [Conversation API](https://developer.vonage.com/api/conversation)
303+
* [Voice API](https://developer.vonage.com/api/voice)
307304

308305
To modify the `auto_advance` behavior you can specify it in your method:
309306

@@ -314,7 +311,7 @@ client.applications.list(auto_advance: false)
314311

315312
## Messages API
316313

317-
The [Vonage Messages API](https://developer.vonage.com/messages/overview) allows you to send messages over a number of different channels, and various message types within each channel. See the Vonage Developer Documentation for a [complete API reference](https://developer.vonage.com/api/messages-olympus) listing all the channel and message type combinations.
314+
The [Vonage Messages API](https://developer.vonage.com/messages/overview) allows you to send messages over a number of different channels, and various message types within each channel. See the Vonage Developer Documentation for a [complete API reference](https://developer.vonage.com/en/api/messages) listing all the channel and message type combinations.
318315

319316
The Ruby SDK allows you to construct message data for specific messaging channels. Other than SMS (which has only one type -- text), you need to pass the message `:type` as well as the `:message` itself as arguments to the appropriate messages method, along with any optional properties if needed.
320317

@@ -513,11 +510,11 @@ response = client.voice.create({
513510

514511
## Documentation
515512

516-
Vonage Ruby SDK documentation: https://www.rubydoc.info/github/Vonage/vonage-ruby-sdk
513+
Vonage Ruby SDK documentation: https://www.rubydoc.info/gems/vonage
517514

518515
Vonage Ruby SDK code examples: https://github.com/Vonage/vonage-ruby-code-snippets
519516

520-
Vonage APIs API reference: https://developer.nexmo.com/api
517+
Vonage APIs API reference: https://developer.vonage.com/api
521518

522519
## Supported APIs
523520

lib/vonage/meetings.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,45 @@ module Vonage
55
class Meetings < Namespace
66
extend T::Sig
77

8+
# @deprecated
89
sig { returns(T.nilable(Vonage::Meetings::Rooms)) }
910
def rooms
11+
logger.info('This method is deprecated and will be removed in a future release.')
1012
@rooms ||= Rooms.new(@config)
1113
end
1214

15+
# @deprecated
1316
sig { returns(T.nilable(Vonage::Meetings::Recordings)) }
1417
def recordings
18+
logger.info('This method is deprecated and will be removed in a future release.')
1519
@recordings ||= Recordings.new(@config)
1620
end
1721

22+
# @deprecated
1823
sig { returns(T.nilable(Vonage::Meetings::Sessions)) }
1924
def sessions
25+
logger.info('This method is deprecated and will be removed in a future release.')
2026
@sessions ||= Sessions.new(@config)
2127
end
2228

29+
# @deprecated
2330
sig { returns(T.nilable(Vonage::Meetings::Themes)) }
2431
def themes
32+
logger.info('This method is deprecated and will be removed in a future release.')
2533
@themes ||= Themes.new(@config)
2634
end
2735

36+
# @deprecated
2837
sig { returns(T.nilable(Vonage::Meetings::Applications)) }
2938
def applications
39+
logger.info('This method is deprecated and will be removed in a future release.')
3040
@applications ||= Applications.new(@config)
3141
end
3242

43+
# @deprecated
3344
sig { returns(T.nilable(Vonage::Meetings::DialInNumbers)) }
3445
def dial_in_numbers
46+
logger.info('This method is deprecated and will be removed in a future release.')
3547
@dial_in_numbers ||= DialInNumbers.new(@config)
3648
end
3749
end

lib/vonage/meetings/applications.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ class Meetings::Applications < Namespace
1313

1414
# Update an existing application.
1515
#
16+
# @deprecated
17+
#
1618
# @param [required, String] :default_theme_id The id of the theme to set as application default theme
1719
#
1820
# @return [Response]
1921
#
2022
# @see https://developer.vonage.com/en/api/meetings#updateApplication
2123
def update(default_theme_id:)
24+
logger.info('This method is deprecated and will be removed in a future release.')
2225
request("/v1/meetings/applications", params: {update_details: {default_theme_id: default_theme_id}}, type: Patch)
2326
end
2427
end

lib/vonage/meetings/dial_in_numbers.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ class Meetings::DialInNumbers < Namespace
1313

1414
# Get numbers that can be used to dial into a meeting.
1515
#
16+
# @deprecated
17+
#
1618
# @return [ListResponse]
1719
#
1820
# @see https://developer.vonage.com/en/api/meetings#getDialInNumbers
1921
def list
22+
logger.info('This method is deprecated and will be removed in a future release.')
2023
request("/v1/meetings/dial-in-numbers", response_class: ListResponse)
2124
end
2225
end

lib/vonage/meetings/recordings.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,29 @@ class Meetings::Recordings < Namespace
1313

1414
# Return information for specified recording.
1515
#
16+
# @deprecated
17+
#
1618
# @param [required, String] recording_id The id of the recoring for which the info should be returned
1719
#
1820
# @return [Response]
1921
#
2022
# @see https://developer.vonage.com/en/api/meetings#getRecording
2123
def info(recording_id:)
24+
logger.info('This method is deprecated and will be removed in a future release.')
2225
request("/v1/meetings/recordings/" + recording_id)
2326
end
2427

2528
# Delete a specified recording.
2629
#
30+
# @deprecated
31+
#
2732
# @param [required, String] recording_id The id of the recoring to be deleted
2833
#
2934
# @return [Response]
3035
#
3136
# @see https://developer.vonage.com/en/api/meetings#deleteRecording
3237
def delete(recording_id:)
38+
logger.info('This method is deprecated and will be removed in a future release.')
3339
request("/v1/meetings/recordings/" + recording_id, type: Delete)
3440
end
3541
end

lib/vonage/meetings/rooms.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class Meetings::Rooms < Namespace
1313

1414
# Get a list of rooms associated with the Vonage application.
1515
#
16+
# @deprecated
17+
#
1618
# @param [optional, Integer] :start_id
1719
#
1820
# @param [optional, Integer] :end_id
@@ -23,6 +25,7 @@ class Meetings::Rooms < Namespace
2325
#
2426
# @see https://developer.vonage.com/en/api/meetings#getRooms
2527
def list(**params)
28+
logger.info('This method is deprecated and will be removed in a future release.')
2629
path = "/v1/meetings/rooms"
2730
path += "?#{Params.encode(params)}" unless params.empty?
2831

@@ -31,18 +34,23 @@ def list(**params)
3134

3235
# Return information for specified room.
3336
#
37+
# @deprecated
38+
#
3439
# @param [required, String] room_id
3540
# The id of the room for which the info should be returned
3641
#
3742
# @return [Response]
3843
#
3944
# @see https://developer.vonage.com/en/api/meetings#getRoom
4045
def info(room_id:)
46+
logger.info('This method is deprecated and will be removed in a future release.')
4147
request("/v1/meetings/rooms/" + room_id)
4248
end
4349

4450
# Create a new room.
4551
#
52+
# @deprecated
53+
#
4654
# @param [required, String] :display_name
4755
#
4856
# @param [optional, String] :metadata
@@ -95,6 +103,7 @@ def info(room_id:)
95103
#
96104
# @see https://developer.vonage.com/en/api/meetings#createRoom
97105
def create(display_name:, **params)
106+
logger.info('This method is deprecated and will be removed in a future release.')
98107
request(
99108
"/v1/meetings/rooms",
100109
params: params.merge({ display_name: display_name }),
@@ -106,6 +115,8 @@ def create(display_name:, **params)
106115
# Although paramaters (other than `room_id`) are optional, at least one other parameter must be provided or an error
107116
# response will be received.
108117
#
118+
# @deprecated
119+
#
109120
# @param [required, String] room_id The ID of the Room to be updated
110121
#
111122
# @param [optional, String(date)] :expires_at
@@ -142,6 +153,7 @@ def create(display_name:, **params)
142153
#
143154
# @see https://developer.vonage.com/en/api/meetings#updateRoom
144155
def update(room_id:, **params)
156+
logger.info('This method is deprecated and will be removed in a future release.')
145157
raise ArgumentError, 'must provide at least one other param in addition to :room_id' if params.empty?
146158
request(
147159
"/v1/meetings/rooms/" + room_id,

lib/vonage/meetings/sessions.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ class Meetings::Sessions < Namespace
1313

1414
# Return a list of recordings for a specified session.
1515
#
16+
# @deprecated
17+
#
1618
# @param [required, String] session_id The id of the session for which the recordings list should be returned
1719
#
1820
# @return [ListResponse]
1921
#
2022
# @see https://developer.vonage.com/en/api/meetings#getSessionRecordings
2123
def list_recordings(session_id:)
24+
logger.info('This method is deprecated and will be removed in a future release.')
2225
request(
2326
"/v1/meetings/sessions/" + session_id + "/recordings",
2427
response_class: ListResponse

lib/vonage/meetings/themes.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,34 @@ class Meetings::Themes < Namespace
1313

1414
# Get a list of themes associated with the Vonage application.
1515
#
16+
# @deprecated
17+
#
1618
# @return [ListResponse]
1719
#
1820
# @see https://developer.vonage.com/en/api/meetings#getThemes
1921
def list
22+
logger.info('This method is deprecated and will be removed in a future release.')
2023
request("/v1/meetings/themes", response_class: ListResponse)
2124
end
2225

2326
# Return information for specified theme.
2427
#
28+
# @deprecated
29+
#
2530
# @param [required, String] theme_id The id of the theme for which the info should be returned
2631
#
2732
# @return [Response]
2833
#
2934
# @see https://developer.vonage.com/en/api/meetings#getThemeById
3035
def info(theme_id:)
36+
logger.info('This method is deprecated and will be removed in a future release.')
3137
request("/v1/meetings/themes/" + theme_id)
3238
end
3339

3440
# Create a new theme.
3541
#
42+
# @deprecated
43+
#
3644
# @param [required, String] :main_color
3745
# The main color that will be used for the meeting room.
3846
#
@@ -49,6 +57,7 @@ def info(theme_id:)
4957
#
5058
# @see https://developer.vonage.com/en/api/meetings#createTheme
5159
def create(main_color:, brand_text:, **params)
60+
logger.info('This method is deprecated and will be removed in a future release.')
5261
request(
5362
"/v1/meetings/themes",
5463
params: params.merge(main_color: main_color, brand_text: brand_text),
@@ -58,6 +67,8 @@ def create(main_color:, brand_text:, **params)
5867

5968
# Update an existing theme.
6069
#
70+
# @deprecated
71+
#
6172
# @param [required, String] theme_id The id of the theme to be updated
6273
#
6374
# @param [required, String] :main_color
@@ -76,6 +87,7 @@ def create(main_color:, brand_text:, **params)
7687
#
7788
# @see https://developer.vonage.com/en/api/meetings#updateTheme
7889
def update(theme_id:, **params)
90+
logger.info('This method is deprecated and will be removed in a future release.')
7991
request(
8092
"/v1/meetings/themes/" + theme_id,
8193
params: {
@@ -87,6 +99,8 @@ def update(theme_id:, **params)
8799

88100
# Delete an existing theme.
89101
#
102+
# @deprecated
103+
#
90104
# @param [required, String] :theme_id The id of the theme to be deleted
91105
#
92106
# @param [optional, Boolean] :force. Set to `true` to force delete a theme currently being used for a room, or as
@@ -96,6 +110,7 @@ def update(theme_id:, **params)
96110
#
97111
# @see https://developer.vonage.com/en/api/meetings#deleteTheme
98112
def delete(theme_id:, force: false)
113+
logger.info('This method is deprecated and will be removed in a future release.')
99114
request(
100115
"/v1/meetings/themes/" + theme_id + "?force=#{force}",
101116
type: Delete
@@ -104,6 +119,8 @@ def delete(theme_id:, force: false)
104119

105120
# Get a list of rooms that are associated with a theme id.
106121
#
122+
# @deprecated
123+
#
107124
# @param [required, String] theme_id THe ID of the theme to search for rooms associated with.
108125
#
109126
# @param [optional, Integer] :start_id
@@ -116,6 +133,7 @@ def delete(theme_id:, force: false)
116133
#
117134
# @see https://developer.vonage.com/en/api/meetings#getRoomsByThemeId
118135
def list_rooms(theme_id:, **params)
136+
logger.info('This method is deprecated and will be removed in a future release.')
119137
path = "/v1/meetings/themes/" + theme_id + "/rooms"
120138
path += "?#{Params.encode(params)}" unless params.empty?
121139

@@ -124,6 +142,8 @@ def list_rooms(theme_id:, **params)
124142

125143
# Set a logo for a theme.
126144
#
145+
# @deprecated
146+
#
127147
# @param [required, String] :theme_id The ID of the theme for which the logo should be set
128148
#
129149
# @param [required, String] :filepath
@@ -146,6 +166,7 @@ def list_rooms(theme_id:, **params)
146166
#
147167
# TODO: add type signature
148168
def set_logo(theme_id:, filepath:, logo_type:)
169+
logger.info('This method is deprecated and will be removed in a future release.')
149170
pn = Pathname.new(filepath)
150171
valid_logo_types = ['white', 'colored', 'favicon']
151172
raise ArgumentError, ':filepath not for a file' unless pn.file?

0 commit comments

Comments
 (0)