bandwidth-sdk 14.1.0 → 14.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/bandwidth.yml +11 -0
- data/coverage/.resultset.json +1 -1
- data/coverage/index.html +2 -2
- data/docs/InitiateCallback.md +3 -1
- data/lib/bandwidth-sdk/models/initiate_callback.rb +33 -4
- data/lib/bandwidth-sdk/version.rb +1 -1
- metadata +43 -67
- data/docs/CreateParticipantRequest.md +0 -24
- data/docs/CreateParticipantResponse.md +0 -20
- data/docs/DeviceApiVersionEnum.md +0 -15
- data/docs/DisconenctCallback.md +0 -50
- data/docs/ForbiddenRequest.md +0 -18
- data/docs/InboundMessageCallback.md +0 -26
- data/docs/InboundMessageCallbackMessage.md +0 -40
- data/docs/MessageDeliveredCallback.md +0 -26
- data/docs/MessageDeliveredCallbackMessage.md +0 -40
- data/docs/MessageFailedCallback.md +0 -28
- data/docs/MessageFailedCallbackMessage.md +0 -40
- data/docs/MessageSendingCallback.md +0 -26
- data/docs/MessageSendingCallbackMessage.md +0 -40
- data/docs/Participant.md +0 -30
- data/docs/ParticipantSubscription.md +0 -20
- data/docs/ParticipantsApi.md +0 -227
- data/docs/PublishPermissionsEnum.md +0 -15
- data/docs/RequestError.md +0 -20
- data/docs/Session.md +0 -20
- data/docs/SessionsApi.md +0 -605
- data/docs/Subscriptions.md +0 -20
- data/docs/TranscriptionList.md +0 -18
- data/docs/TranscriptionMetadata.md +0 -24
- data/docs/UnauthorizedRequest.md +0 -18
data/docs/SessionsApi.md
DELETED
@@ -1,605 +0,0 @@
|
|
1
|
-
# Bandwidth::SessionsApi
|
2
|
-
|
3
|
-
All URIs are relative to *http://localhost*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**add_participant_to_session**](SessionsApi.md#add_participant_to_session) | **PUT** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId} | Add Participant to Session |
|
8
|
-
| [**create_session**](SessionsApi.md#create_session) | **POST** /accounts/{accountId}/sessions | Create Session |
|
9
|
-
| [**delete_session**](SessionsApi.md#delete_session) | **DELETE** /accounts/{accountId}/sessions/{sessionId} | Delete Session |
|
10
|
-
| [**get_participant_subscriptions**](SessionsApi.md#get_participant_subscriptions) | **GET** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions | Get Participant Subscriptions |
|
11
|
-
| [**get_session**](SessionsApi.md#get_session) | **GET** /accounts/{accountId}/sessions/{sessionId} | Get Session |
|
12
|
-
| [**list_session_participants**](SessionsApi.md#list_session_participants) | **GET** /accounts/{accountId}/sessions/{sessionId}/participants | List Participants in Session |
|
13
|
-
| [**remove_participant_from_session**](SessionsApi.md#remove_participant_from_session) | **DELETE** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId} | Remove Participant from Session |
|
14
|
-
| [**update_participant_subscriptions**](SessionsApi.md#update_participant_subscriptions) | **PUT** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions | Update Participant Subscriptions |
|
15
|
-
|
16
|
-
|
17
|
-
## add_participant_to_session
|
18
|
-
|
19
|
-
> add_participant_to_session(account_id, session_id, participant_id, opts)
|
20
|
-
|
21
|
-
Add Participant to Session
|
22
|
-
|
23
|
-
Add a participant to a session. Subscriptions can optionally be provided as part of this call.
|
24
|
-
|
25
|
-
### Examples
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
require 'time'
|
29
|
-
require 'bandwidth-sdk'
|
30
|
-
# setup authorization
|
31
|
-
Bandwidth.configure do |config|
|
32
|
-
# Configure HTTP basic authorization: Basic
|
33
|
-
config.username = 'YOUR USERNAME'
|
34
|
-
config.password = 'YOUR PASSWORD'
|
35
|
-
end
|
36
|
-
|
37
|
-
api_instance = Bandwidth::SessionsApi.new
|
38
|
-
account_id = '9900000' # String | Account ID
|
39
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
40
|
-
participant_id = '62e0ecb9-0b1b-5115-aae4-4f36123d6bb1' # String | Participant ID
|
41
|
-
opts = {
|
42
|
-
subscriptions: Bandwidth::Subscriptions.new # Subscriptions | The Body describes an optional set of subscriptions to apply to the participant. Calling this endpoint with no/empty body will only add the participant to the session, and will not subscribe the Participant to any media. The request body for this endpoint is OPTIONAL and provided as a convenience to avoid additional calls to the Update Participant Subscriptions endpoint. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created
|
43
|
-
}
|
44
|
-
|
45
|
-
begin
|
46
|
-
# Add Participant to Session
|
47
|
-
api_instance.add_participant_to_session(account_id, session_id, participant_id, opts)
|
48
|
-
rescue Bandwidth::ApiError => e
|
49
|
-
puts "Error when calling SessionsApi->add_participant_to_session: #{e}"
|
50
|
-
end
|
51
|
-
```
|
52
|
-
|
53
|
-
#### Using the add_participant_to_session_with_http_info variant
|
54
|
-
|
55
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
56
|
-
|
57
|
-
> <Array(nil, Integer, Hash)> add_participant_to_session_with_http_info(account_id, session_id, participant_id, opts)
|
58
|
-
|
59
|
-
```ruby
|
60
|
-
begin
|
61
|
-
# Add Participant to Session
|
62
|
-
data, status_code, headers = api_instance.add_participant_to_session_with_http_info(account_id, session_id, participant_id, opts)
|
63
|
-
p status_code # => 2xx
|
64
|
-
p headers # => { ... }
|
65
|
-
p data # => nil
|
66
|
-
rescue Bandwidth::ApiError => e
|
67
|
-
puts "Error when calling SessionsApi->add_participant_to_session_with_http_info: #{e}"
|
68
|
-
end
|
69
|
-
```
|
70
|
-
|
71
|
-
### Parameters
|
72
|
-
|
73
|
-
| Name | Type | Description | Notes |
|
74
|
-
| ---- | ---- | ----------- | ----- |
|
75
|
-
| **account_id** | **String** | Account ID | |
|
76
|
-
| **session_id** | **String** | Session ID | |
|
77
|
-
| **participant_id** | **String** | Participant ID | |
|
78
|
-
| **subscriptions** | [**Subscriptions**](Subscriptions.md) | The Body describes an optional set of subscriptions to apply to the participant. Calling this endpoint with no/empty body will only add the participant to the session, and will not subscribe the Participant to any media. The request body for this endpoint is OPTIONAL and provided as a convenience to avoid additional calls to the Update Participant Subscriptions endpoint. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created | [optional] |
|
79
|
-
|
80
|
-
### Return type
|
81
|
-
|
82
|
-
nil (empty response body)
|
83
|
-
|
84
|
-
### Authorization
|
85
|
-
|
86
|
-
[Basic](../README.md#Basic)
|
87
|
-
|
88
|
-
### HTTP request headers
|
89
|
-
|
90
|
-
- **Content-Type**: application/json
|
91
|
-
- **Accept**: application/json
|
92
|
-
|
93
|
-
|
94
|
-
## create_session
|
95
|
-
|
96
|
-
> <Session> create_session(account_id, opts)
|
97
|
-
|
98
|
-
Create Session
|
99
|
-
|
100
|
-
Create a new session. Sessions are idempotent, so relevant parameters must be set in this function if desired.
|
101
|
-
|
102
|
-
### Examples
|
103
|
-
|
104
|
-
```ruby
|
105
|
-
require 'time'
|
106
|
-
require 'bandwidth-sdk'
|
107
|
-
# setup authorization
|
108
|
-
Bandwidth.configure do |config|
|
109
|
-
# Configure HTTP basic authorization: Basic
|
110
|
-
config.username = 'YOUR USERNAME'
|
111
|
-
config.password = 'YOUR PASSWORD'
|
112
|
-
end
|
113
|
-
|
114
|
-
api_instance = Bandwidth::SessionsApi.new
|
115
|
-
account_id = '9900000' # String | Account ID
|
116
|
-
opts = {
|
117
|
-
session: Bandwidth::Session.new # Session | Create session request body.
|
118
|
-
}
|
119
|
-
|
120
|
-
begin
|
121
|
-
# Create Session
|
122
|
-
result = api_instance.create_session(account_id, opts)
|
123
|
-
p result
|
124
|
-
rescue Bandwidth::ApiError => e
|
125
|
-
puts "Error when calling SessionsApi->create_session: #{e}"
|
126
|
-
end
|
127
|
-
```
|
128
|
-
|
129
|
-
#### Using the create_session_with_http_info variant
|
130
|
-
|
131
|
-
This returns an Array which contains the response data, status code and headers.
|
132
|
-
|
133
|
-
> <Array(<Session>, Integer, Hash)> create_session_with_http_info(account_id, opts)
|
134
|
-
|
135
|
-
```ruby
|
136
|
-
begin
|
137
|
-
# Create Session
|
138
|
-
data, status_code, headers = api_instance.create_session_with_http_info(account_id, opts)
|
139
|
-
p status_code # => 2xx
|
140
|
-
p headers # => { ... }
|
141
|
-
p data # => <Session>
|
142
|
-
rescue Bandwidth::ApiError => e
|
143
|
-
puts "Error when calling SessionsApi->create_session_with_http_info: #{e}"
|
144
|
-
end
|
145
|
-
```
|
146
|
-
|
147
|
-
### Parameters
|
148
|
-
|
149
|
-
| Name | Type | Description | Notes |
|
150
|
-
| ---- | ---- | ----------- | ----- |
|
151
|
-
| **account_id** | **String** | Account ID | |
|
152
|
-
| **session** | [**Session**](Session.md) | Create session request body. | [optional] |
|
153
|
-
|
154
|
-
### Return type
|
155
|
-
|
156
|
-
[**Session**](Session.md)
|
157
|
-
|
158
|
-
### Authorization
|
159
|
-
|
160
|
-
[Basic](../README.md#Basic)
|
161
|
-
|
162
|
-
### HTTP request headers
|
163
|
-
|
164
|
-
- **Content-Type**: application/json
|
165
|
-
- **Accept**: application/json
|
166
|
-
|
167
|
-
|
168
|
-
## delete_session
|
169
|
-
|
170
|
-
> delete_session(account_id, session_id)
|
171
|
-
|
172
|
-
Delete Session
|
173
|
-
|
174
|
-
Delete session by ID.
|
175
|
-
|
176
|
-
### Examples
|
177
|
-
|
178
|
-
```ruby
|
179
|
-
require 'time'
|
180
|
-
require 'bandwidth-sdk'
|
181
|
-
# setup authorization
|
182
|
-
Bandwidth.configure do |config|
|
183
|
-
# Configure HTTP basic authorization: Basic
|
184
|
-
config.username = 'YOUR USERNAME'
|
185
|
-
config.password = 'YOUR PASSWORD'
|
186
|
-
end
|
187
|
-
|
188
|
-
api_instance = Bandwidth::SessionsApi.new
|
189
|
-
account_id = '9900000' # String | Account ID
|
190
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
191
|
-
|
192
|
-
begin
|
193
|
-
# Delete Session
|
194
|
-
api_instance.delete_session(account_id, session_id)
|
195
|
-
rescue Bandwidth::ApiError => e
|
196
|
-
puts "Error when calling SessionsApi->delete_session: #{e}"
|
197
|
-
end
|
198
|
-
```
|
199
|
-
|
200
|
-
#### Using the delete_session_with_http_info variant
|
201
|
-
|
202
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
203
|
-
|
204
|
-
> <Array(nil, Integer, Hash)> delete_session_with_http_info(account_id, session_id)
|
205
|
-
|
206
|
-
```ruby
|
207
|
-
begin
|
208
|
-
# Delete Session
|
209
|
-
data, status_code, headers = api_instance.delete_session_with_http_info(account_id, session_id)
|
210
|
-
p status_code # => 2xx
|
211
|
-
p headers # => { ... }
|
212
|
-
p data # => nil
|
213
|
-
rescue Bandwidth::ApiError => e
|
214
|
-
puts "Error when calling SessionsApi->delete_session_with_http_info: #{e}"
|
215
|
-
end
|
216
|
-
```
|
217
|
-
|
218
|
-
### Parameters
|
219
|
-
|
220
|
-
| Name | Type | Description | Notes |
|
221
|
-
| ---- | ---- | ----------- | ----- |
|
222
|
-
| **account_id** | **String** | Account ID | |
|
223
|
-
| **session_id** | **String** | Session ID | |
|
224
|
-
|
225
|
-
### Return type
|
226
|
-
|
227
|
-
nil (empty response body)
|
228
|
-
|
229
|
-
### Authorization
|
230
|
-
|
231
|
-
[Basic](../README.md#Basic)
|
232
|
-
|
233
|
-
### HTTP request headers
|
234
|
-
|
235
|
-
- **Content-Type**: Not defined
|
236
|
-
- **Accept**: application/json
|
237
|
-
|
238
|
-
|
239
|
-
## get_participant_subscriptions
|
240
|
-
|
241
|
-
> <Subscriptions> get_participant_subscriptions(account_id, session_id, participant_id)
|
242
|
-
|
243
|
-
Get Participant Subscriptions
|
244
|
-
|
245
|
-
Get a participant's subscriptions.
|
246
|
-
|
247
|
-
### Examples
|
248
|
-
|
249
|
-
```ruby
|
250
|
-
require 'time'
|
251
|
-
require 'bandwidth-sdk'
|
252
|
-
# setup authorization
|
253
|
-
Bandwidth.configure do |config|
|
254
|
-
# Configure HTTP basic authorization: Basic
|
255
|
-
config.username = 'YOUR USERNAME'
|
256
|
-
config.password = 'YOUR PASSWORD'
|
257
|
-
end
|
258
|
-
|
259
|
-
api_instance = Bandwidth::SessionsApi.new
|
260
|
-
account_id = '9900000' # String | Account ID
|
261
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
262
|
-
participant_id = '62e0ecb9-0b1b-5115-aae4-4f36123d6bb1' # String | Participant ID
|
263
|
-
|
264
|
-
begin
|
265
|
-
# Get Participant Subscriptions
|
266
|
-
result = api_instance.get_participant_subscriptions(account_id, session_id, participant_id)
|
267
|
-
p result
|
268
|
-
rescue Bandwidth::ApiError => e
|
269
|
-
puts "Error when calling SessionsApi->get_participant_subscriptions: #{e}"
|
270
|
-
end
|
271
|
-
```
|
272
|
-
|
273
|
-
#### Using the get_participant_subscriptions_with_http_info variant
|
274
|
-
|
275
|
-
This returns an Array which contains the response data, status code and headers.
|
276
|
-
|
277
|
-
> <Array(<Subscriptions>, Integer, Hash)> get_participant_subscriptions_with_http_info(account_id, session_id, participant_id)
|
278
|
-
|
279
|
-
```ruby
|
280
|
-
begin
|
281
|
-
# Get Participant Subscriptions
|
282
|
-
data, status_code, headers = api_instance.get_participant_subscriptions_with_http_info(account_id, session_id, participant_id)
|
283
|
-
p status_code # => 2xx
|
284
|
-
p headers # => { ... }
|
285
|
-
p data # => <Subscriptions>
|
286
|
-
rescue Bandwidth::ApiError => e
|
287
|
-
puts "Error when calling SessionsApi->get_participant_subscriptions_with_http_info: #{e}"
|
288
|
-
end
|
289
|
-
```
|
290
|
-
|
291
|
-
### Parameters
|
292
|
-
|
293
|
-
| Name | Type | Description | Notes |
|
294
|
-
| ---- | ---- | ----------- | ----- |
|
295
|
-
| **account_id** | **String** | Account ID | |
|
296
|
-
| **session_id** | **String** | Session ID | |
|
297
|
-
| **participant_id** | **String** | Participant ID | |
|
298
|
-
|
299
|
-
### Return type
|
300
|
-
|
301
|
-
[**Subscriptions**](Subscriptions.md)
|
302
|
-
|
303
|
-
### Authorization
|
304
|
-
|
305
|
-
[Basic](../README.md#Basic)
|
306
|
-
|
307
|
-
### HTTP request headers
|
308
|
-
|
309
|
-
- **Content-Type**: Not defined
|
310
|
-
- **Accept**: application/json
|
311
|
-
|
312
|
-
|
313
|
-
## get_session
|
314
|
-
|
315
|
-
> <Session> get_session(account_id, session_id)
|
316
|
-
|
317
|
-
Get Session
|
318
|
-
|
319
|
-
Get session by ID.
|
320
|
-
|
321
|
-
### Examples
|
322
|
-
|
323
|
-
```ruby
|
324
|
-
require 'time'
|
325
|
-
require 'bandwidth-sdk'
|
326
|
-
# setup authorization
|
327
|
-
Bandwidth.configure do |config|
|
328
|
-
# Configure HTTP basic authorization: Basic
|
329
|
-
config.username = 'YOUR USERNAME'
|
330
|
-
config.password = 'YOUR PASSWORD'
|
331
|
-
end
|
332
|
-
|
333
|
-
api_instance = Bandwidth::SessionsApi.new
|
334
|
-
account_id = '9900000' # String | Account ID
|
335
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
336
|
-
|
337
|
-
begin
|
338
|
-
# Get Session
|
339
|
-
result = api_instance.get_session(account_id, session_id)
|
340
|
-
p result
|
341
|
-
rescue Bandwidth::ApiError => e
|
342
|
-
puts "Error when calling SessionsApi->get_session: #{e}"
|
343
|
-
end
|
344
|
-
```
|
345
|
-
|
346
|
-
#### Using the get_session_with_http_info variant
|
347
|
-
|
348
|
-
This returns an Array which contains the response data, status code and headers.
|
349
|
-
|
350
|
-
> <Array(<Session>, Integer, Hash)> get_session_with_http_info(account_id, session_id)
|
351
|
-
|
352
|
-
```ruby
|
353
|
-
begin
|
354
|
-
# Get Session
|
355
|
-
data, status_code, headers = api_instance.get_session_with_http_info(account_id, session_id)
|
356
|
-
p status_code # => 2xx
|
357
|
-
p headers # => { ... }
|
358
|
-
p data # => <Session>
|
359
|
-
rescue Bandwidth::ApiError => e
|
360
|
-
puts "Error when calling SessionsApi->get_session_with_http_info: #{e}"
|
361
|
-
end
|
362
|
-
```
|
363
|
-
|
364
|
-
### Parameters
|
365
|
-
|
366
|
-
| Name | Type | Description | Notes |
|
367
|
-
| ---- | ---- | ----------- | ----- |
|
368
|
-
| **account_id** | **String** | Account ID | |
|
369
|
-
| **session_id** | **String** | Session ID | |
|
370
|
-
|
371
|
-
### Return type
|
372
|
-
|
373
|
-
[**Session**](Session.md)
|
374
|
-
|
375
|
-
### Authorization
|
376
|
-
|
377
|
-
[Basic](../README.md#Basic)
|
378
|
-
|
379
|
-
### HTTP request headers
|
380
|
-
|
381
|
-
- **Content-Type**: Not defined
|
382
|
-
- **Accept**: application/json
|
383
|
-
|
384
|
-
|
385
|
-
## list_session_participants
|
386
|
-
|
387
|
-
> <Array<Participant>> list_session_participants(account_id, session_id)
|
388
|
-
|
389
|
-
List Participants in Session
|
390
|
-
|
391
|
-
List participants in a session.
|
392
|
-
|
393
|
-
### Examples
|
394
|
-
|
395
|
-
```ruby
|
396
|
-
require 'time'
|
397
|
-
require 'bandwidth-sdk'
|
398
|
-
# setup authorization
|
399
|
-
Bandwidth.configure do |config|
|
400
|
-
# Configure HTTP basic authorization: Basic
|
401
|
-
config.username = 'YOUR USERNAME'
|
402
|
-
config.password = 'YOUR PASSWORD'
|
403
|
-
end
|
404
|
-
|
405
|
-
api_instance = Bandwidth::SessionsApi.new
|
406
|
-
account_id = '9900000' # String | Account ID
|
407
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
408
|
-
|
409
|
-
begin
|
410
|
-
# List Participants in Session
|
411
|
-
result = api_instance.list_session_participants(account_id, session_id)
|
412
|
-
p result
|
413
|
-
rescue Bandwidth::ApiError => e
|
414
|
-
puts "Error when calling SessionsApi->list_session_participants: #{e}"
|
415
|
-
end
|
416
|
-
```
|
417
|
-
|
418
|
-
#### Using the list_session_participants_with_http_info variant
|
419
|
-
|
420
|
-
This returns an Array which contains the response data, status code and headers.
|
421
|
-
|
422
|
-
> <Array(<Array<Participant>>, Integer, Hash)> list_session_participants_with_http_info(account_id, session_id)
|
423
|
-
|
424
|
-
```ruby
|
425
|
-
begin
|
426
|
-
# List Participants in Session
|
427
|
-
data, status_code, headers = api_instance.list_session_participants_with_http_info(account_id, session_id)
|
428
|
-
p status_code # => 2xx
|
429
|
-
p headers # => { ... }
|
430
|
-
p data # => <Array<Participant>>
|
431
|
-
rescue Bandwidth::ApiError => e
|
432
|
-
puts "Error when calling SessionsApi->list_session_participants_with_http_info: #{e}"
|
433
|
-
end
|
434
|
-
```
|
435
|
-
|
436
|
-
### Parameters
|
437
|
-
|
438
|
-
| Name | Type | Description | Notes |
|
439
|
-
| ---- | ---- | ----------- | ----- |
|
440
|
-
| **account_id** | **String** | Account ID | |
|
441
|
-
| **session_id** | **String** | Session ID | |
|
442
|
-
|
443
|
-
### Return type
|
444
|
-
|
445
|
-
[**Array<Participant>**](Participant.md)
|
446
|
-
|
447
|
-
### Authorization
|
448
|
-
|
449
|
-
[Basic](../README.md#Basic)
|
450
|
-
|
451
|
-
### HTTP request headers
|
452
|
-
|
453
|
-
- **Content-Type**: Not defined
|
454
|
-
- **Accept**: application/json
|
455
|
-
|
456
|
-
|
457
|
-
## remove_participant_from_session
|
458
|
-
|
459
|
-
> remove_participant_from_session(account_id, session_id, participant_id)
|
460
|
-
|
461
|
-
Remove Participant from Session
|
462
|
-
|
463
|
-
Remove a participant from a session. This will automatically remove any subscriptions the participant has associated with this session.
|
464
|
-
|
465
|
-
### Examples
|
466
|
-
|
467
|
-
```ruby
|
468
|
-
require 'time'
|
469
|
-
require 'bandwidth-sdk'
|
470
|
-
# setup authorization
|
471
|
-
Bandwidth.configure do |config|
|
472
|
-
# Configure HTTP basic authorization: Basic
|
473
|
-
config.username = 'YOUR USERNAME'
|
474
|
-
config.password = 'YOUR PASSWORD'
|
475
|
-
end
|
476
|
-
|
477
|
-
api_instance = Bandwidth::SessionsApi.new
|
478
|
-
account_id = '9900000' # String | Account ID
|
479
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
480
|
-
participant_id = '62e0ecb9-0b1b-5115-aae4-4f36123d6bb1' # String | Participant ID
|
481
|
-
|
482
|
-
begin
|
483
|
-
# Remove Participant from Session
|
484
|
-
api_instance.remove_participant_from_session(account_id, session_id, participant_id)
|
485
|
-
rescue Bandwidth::ApiError => e
|
486
|
-
puts "Error when calling SessionsApi->remove_participant_from_session: #{e}"
|
487
|
-
end
|
488
|
-
```
|
489
|
-
|
490
|
-
#### Using the remove_participant_from_session_with_http_info variant
|
491
|
-
|
492
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
493
|
-
|
494
|
-
> <Array(nil, Integer, Hash)> remove_participant_from_session_with_http_info(account_id, session_id, participant_id)
|
495
|
-
|
496
|
-
```ruby
|
497
|
-
begin
|
498
|
-
# Remove Participant from Session
|
499
|
-
data, status_code, headers = api_instance.remove_participant_from_session_with_http_info(account_id, session_id, participant_id)
|
500
|
-
p status_code # => 2xx
|
501
|
-
p headers # => { ... }
|
502
|
-
p data # => nil
|
503
|
-
rescue Bandwidth::ApiError => e
|
504
|
-
puts "Error when calling SessionsApi->remove_participant_from_session_with_http_info: #{e}"
|
505
|
-
end
|
506
|
-
```
|
507
|
-
|
508
|
-
### Parameters
|
509
|
-
|
510
|
-
| Name | Type | Description | Notes |
|
511
|
-
| ---- | ---- | ----------- | ----- |
|
512
|
-
| **account_id** | **String** | Account ID | |
|
513
|
-
| **session_id** | **String** | Session ID | |
|
514
|
-
| **participant_id** | **String** | Participant ID | |
|
515
|
-
|
516
|
-
### Return type
|
517
|
-
|
518
|
-
nil (empty response body)
|
519
|
-
|
520
|
-
### Authorization
|
521
|
-
|
522
|
-
[Basic](../README.md#Basic)
|
523
|
-
|
524
|
-
### HTTP request headers
|
525
|
-
|
526
|
-
- **Content-Type**: Not defined
|
527
|
-
- **Accept**: application/json
|
528
|
-
|
529
|
-
|
530
|
-
## update_participant_subscriptions
|
531
|
-
|
532
|
-
> update_participant_subscriptions(account_id, session_id, participant_id, opts)
|
533
|
-
|
534
|
-
Update Participant Subscriptions
|
535
|
-
|
536
|
-
Update a participant's subscriptions. This is a full update that will replace the participant's subscriptions. It allows subscription to the entire Session, a subset list of Participants in that Session, or specific media streams on any of the listed Participants. First call `getParticipantSubscriptions` if you need the current subscriptions. Calling this API with no `Subscriptions` object to remove all subscriptions.
|
537
|
-
|
538
|
-
### Examples
|
539
|
-
|
540
|
-
```ruby
|
541
|
-
require 'time'
|
542
|
-
require 'bandwidth-sdk'
|
543
|
-
# setup authorization
|
544
|
-
Bandwidth.configure do |config|
|
545
|
-
# Configure HTTP basic authorization: Basic
|
546
|
-
config.username = 'YOUR USERNAME'
|
547
|
-
config.password = 'YOUR PASSWORD'
|
548
|
-
end
|
549
|
-
|
550
|
-
api_instance = Bandwidth::SessionsApi.new
|
551
|
-
account_id = '9900000' # String | Account ID
|
552
|
-
session_id = 'cb5054ee-a69b-41ac-9ab2-04d6370826b4' # String | Session ID
|
553
|
-
participant_id = '62e0ecb9-0b1b-5115-aae4-4f36123d6bb1' # String | Participant ID
|
554
|
-
opts = {
|
555
|
-
subscriptions: Bandwidth::Subscriptions.new # Subscriptions | The body describes the desired subscriptions for the Participant. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created
|
556
|
-
}
|
557
|
-
|
558
|
-
begin
|
559
|
-
# Update Participant Subscriptions
|
560
|
-
api_instance.update_participant_subscriptions(account_id, session_id, participant_id, opts)
|
561
|
-
rescue Bandwidth::ApiError => e
|
562
|
-
puts "Error when calling SessionsApi->update_participant_subscriptions: #{e}"
|
563
|
-
end
|
564
|
-
```
|
565
|
-
|
566
|
-
#### Using the update_participant_subscriptions_with_http_info variant
|
567
|
-
|
568
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
569
|
-
|
570
|
-
> <Array(nil, Integer, Hash)> update_participant_subscriptions_with_http_info(account_id, session_id, participant_id, opts)
|
571
|
-
|
572
|
-
```ruby
|
573
|
-
begin
|
574
|
-
# Update Participant Subscriptions
|
575
|
-
data, status_code, headers = api_instance.update_participant_subscriptions_with_http_info(account_id, session_id, participant_id, opts)
|
576
|
-
p status_code # => 2xx
|
577
|
-
p headers # => { ... }
|
578
|
-
p data # => nil
|
579
|
-
rescue Bandwidth::ApiError => e
|
580
|
-
puts "Error when calling SessionsApi->update_participant_subscriptions_with_http_info: #{e}"
|
581
|
-
end
|
582
|
-
```
|
583
|
-
|
584
|
-
### Parameters
|
585
|
-
|
586
|
-
| Name | Type | Description | Notes |
|
587
|
-
| ---- | ---- | ----------- | ----- |
|
588
|
-
| **account_id** | **String** | Account ID | |
|
589
|
-
| **session_id** | **String** | Session ID | |
|
590
|
-
| **participant_id** | **String** | Participant ID | |
|
591
|
-
| **subscriptions** | [**Subscriptions**](Subscriptions.md) | The body describes the desired subscriptions for the Participant. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created | [optional] |
|
592
|
-
|
593
|
-
### Return type
|
594
|
-
|
595
|
-
nil (empty response body)
|
596
|
-
|
597
|
-
### Authorization
|
598
|
-
|
599
|
-
[Basic](../README.md#Basic)
|
600
|
-
|
601
|
-
### HTTP request headers
|
602
|
-
|
603
|
-
- **Content-Type**: application/json
|
604
|
-
- **Accept**: application/json
|
605
|
-
|
data/docs/Subscriptions.md
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# Bandwidth::Subscriptions
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **session_id** | **String** | If present, and not overridden by the array of participants, it represents the session the subscriptions are associated with. If this is the only field, the subscriber will be subscribed to all participants in the session (including any participants that are later added to the session). Upon creation of a Participant, returns as an empty object. | [optional] |
|
8
|
-
| **participants** | [**Array<ParticipantSubscription>**](ParticipantSubscription.md) | (optional) A list of participants in the session that will be subscribed to. If present and not empty or null, this will override any sessionId specified in the body. Returns empty if used during the creation of a Participant. | [optional] |
|
9
|
-
|
10
|
-
## Example
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'bandwidth-sdk'
|
14
|
-
|
15
|
-
instance = Bandwidth::Subscriptions.new(
|
16
|
-
session_id: d8886aad-b956-4e1b-b2f4-d7c9f8162772,
|
17
|
-
participants: [{"participantId":"568749d5-04d5-483d-adf5-deac7dd3d521"},{"participantId":"0275e47f-dd21-4cf0-a1e1-dfdc719e73a7","streamAliases":["alias_1","alias_2"]}]
|
18
|
-
)
|
19
|
-
```
|
20
|
-
|
data/docs/TranscriptionList.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Bandwidth::TranscriptionList
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **transcripts** | [**Array<Transcription>**](Transcription.md) | | [optional] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'bandwidth-sdk'
|
13
|
-
|
14
|
-
instance = Bandwidth::TranscriptionList.new(
|
15
|
-
transcripts: null
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Bandwidth::TranscriptionMetadata
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **id** | **String** | The unique transcription ID | [optional] |
|
8
|
-
| **status** | **String** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] |
|
9
|
-
| **completed_time** | **String** | The time that the transcription was completed | [optional] |
|
10
|
-
| **url** | **String** | The URL of the [transcription](#operation/getCallTranscription) | [optional] |
|
11
|
-
|
12
|
-
## Example
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
require 'bandwidth-sdk'
|
16
|
-
|
17
|
-
instance = Bandwidth::TranscriptionMetadata.new(
|
18
|
-
id: t-387bd648-18f3-4823-9d16-746bca0003c9,
|
19
|
-
status: completed,
|
20
|
-
completed_time: 2022-06-13T18:46:29.715Z,
|
21
|
-
url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription
|
22
|
-
)
|
23
|
-
```
|
24
|
-
|
data/docs/UnauthorizedRequest.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Bandwidth::UnauthorizedRequest
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **message** | **String** | Unauthorized | [optional] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'bandwidth-sdk'
|
13
|
-
|
14
|
-
instance = Bandwidth::UnauthorizedRequest.new(
|
15
|
-
message: Unauthorized
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|