8000 [Librarian] Regenerated @ 0604d0d9a213f39954083b366c3fc667d22d702e · githubib/twilio-python@a5eff4c · GitHub
[go: up one dir, main page]

Skip to content

Commit a5eff4c

Browse files
committed
[Librarian] Regenerated @ 0604d0d9a213f39954083b366c3fc667d22d702e
1 parent 6e7015d commit a5eff4c

File tree

9 files changed

+92
-43
lines changed

9 files changed

+92
-43
lines changed

CHANGES.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2020-12-02] Version 6.49.0
7+
---------------------------
8+
**Library - Feature**
9+
- [PR #546](https://github.com/twilio/twilio-python/pull/546): Regional twr header in the access token. Thanks to [@charliesantos](https://github.com/charliesantos)!
10+
11+
**Api**
12+
- Remove `RecordingTrack` parameter for create calls, create participants, and create call recordings **(breaking change)**
13+
- Added `RecordingTrack` parameter for create calls and create call recordings
14+
- Add optional property `recording_track` in the participant create request
15+
16+
**Lookups**
17+
- Changed `caller_name` and `carrier` properties type to object **(breaking change)**
18+
19+
**Trunking**
20+
- Added dual channel recording options for Trunks.
21+
22+
**Twiml**
23+
- Add `jitterBufferSize` and `participantLabel` to `Conference`.
24+
25+
626
[2020-11-18] Version 6.48.0
727
---------------------------
828
**Api**

tests/integration/api/v2010/account/call/test_recording.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_create_response(self):
4848
"status": "in-progress",
4949
"error_code": null,
5050
"encryption_details": null,
51+
"track": "both",
5152
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
5253
}
5354
'''
@@ -96,6 +97,7 @@ def test_update_response(self):
9697
"status": "paused",
9798
"error_code": null,
9899
"encryption_details": null,
100+
"track": "both",
99101
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
100102
}
101103
'''
@@ -145,6 +147,7 @@ def test_fetch_response(self):
145147
"source": "StartCallRecordingAPI",
146148
"status": "completed",
147149
"error_code": null,
150+
"track": "both",
148151
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
149152
}
150153
'''
@@ -226,6 +229,7 @@ def test_read_full_response(self):
226229
},
227230
"source": "StartCallRecordingAPI",
228231
"status": "completed",
232+
"track": "both",
229233
"error_code": null,
230234
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
231235
}

tests/integration/api/v2010/account/conference/test_participant.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,35 @@ def test_create_with_friendly_name_reason_response(self):
462462

463463
self.assertIsNotNone(actual)
464464

465+
def test_create_with_friendly_name_recording_track_response(self):
466+
self.holodeck.mock(Response(
467+
201,
468+
'''
469+
{
470+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
471+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
472+
"label": null,
473+
"conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
474+
"date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
475+
"date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
476+
"end_conference_on_exit": false,
477+
"muted": false,
478+
"hold": false,
479+
"status": "complete",
480+
"start_conference_on_enter": true,
481+
"coaching": false,
482+
"call_sid_to_coach": null,
483+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
484+
}
485+
'''
486+
))
487+
488+
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
489+
.conferences("CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
490+
.participants.create(from_="+15017122661", to="+15558675310")
491+
492+
self.assertIsNotNone(actual)
493+
465494
def test_delete_request(self):
466495
self.holodeck.mock(Response(500, ''))
467496

tests/integration/lookups/v1/test_phone_number.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_fetch_carrier_response(self):
6464
"phone_number": "+15108675310",
6565
"fraud": null,
6666
"add_ons": null,
67-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier"
67+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310"
6868
}
6969
'''
7070
))
@@ -91,7 +91,7 @@ def test_fetch_carrier_international_response(self):
9191
"phone_number": "+4402077651182",
9292
"fraud": null,
9393
"add_ons": null,
94-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+4402077651182?Type=carrier"
94+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+4402077651182"
9595
}
9696
'''
9797
))
@@ -116,7 +116,7 @@ def test_fetch_caller_name_response(self):
116116
"national_format": "(510) 867-5310",
117117
"phone_number": "+15108675310",
118118
"add_ons": null,
119-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=caller-name"
119+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310"
120120
}
121121
'''
122122
))
@@ -152,7 +152,7 @@ def test_fetch_carrier_and_caller_name_response(self):
152152
"code": null,
153153
"results": {}
154154
},
155-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier&Type=caller-name"
155+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310"
156156
}
157157
'''
158158
))
@@ -226,7 +226,7 @@ def test_fetch_addons_whitepages_pro_response(self):
226226
}
227227
}
228228
},
229-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+12127363100?Type=caller-name"
229+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+12127363100"
230230
}
231231
'''
232232
))
@@ -270,7 +270,7 @@ def test_fetch_addons_nomorobo_response(self):
270270
}
271271
}
272272
},
273-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+19892008374?Type=carrier"
273+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+19892008374"
274274
}
275275
'''
276276
))
@@ -319,7 +319,7 @@ def test_fetch_addons_payfone_response(self):
319319
}
320320
}
321321
},
322-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?Type=carrier"
322+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+16502530000"
323323
}
324324
'''
325325
))

tests/integration/taskrouter/v1/workspace/worker/test_worker_channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_update_response(self):
162162
"sid": "WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
163163
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
164164
"task_channel_unique_name": "default",
165-
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
165+
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
166166
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
167167
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
168168
}

tests/integration/trunking/v1/trunk/test_recording.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def test_fetch_response(self):
3232
'''
3333
{
3434
"mode": "do-not-record",
35-
"trim": "do-not-trim",
36-
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recording",
37-
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
35+
"trim": "do-not-trim"
3836
}
3937
'''
4038
))
@@ -62,9 +60,7 @@ def test_update_response(self):
6260
'''
6361
{
6462
"mode": "do-not-record",
65-
"trim": "do-not-trim",
66-
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recording",
67-
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
63+
"trim": "do-not-trim"
6864
}
6965
'''
7066
))

twilio/rest/api/v2010/account/call/recording.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ def __init__(self, version, payload, account_sid, call_sid, sid=None):
387387
'channels': deserialize.integer(payload.get('channels')),
388388
'source': payload.get('source'),
389389
'error_code': deserialize.integer(payload.get('error_code')),
390+
'track': payload.get('track'),
390391
}
391392

392393
# Context
@@ -551,6 +552,14 @@ def error_code(self):
551552
"""
552553
return self._properties['error_code']
553554

555+
@property
556+
def track(self):
557+
"""
558+
:returns: The recorded track. Can be: `inbound`, `outbound`, or `both`.
559+
:rtype: unicode
560+
"""
561+
return self._properties['track']
562+
554563
def update(self, status, pause_behavior=values.unset):
555564
"""
556565
Update the RecordingInstance

twilio/rest/trunking/v1/trunk/recording.py

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, version, trunk_sid):
2020
Initialize the RecordingList
2121
2222
:param Version version: Version that contains the resource
23-
:param trunk_sid: The trunk_sid
23+
:param trunk_sid: The unique string that identifies the resource
2424
2525
:returns: twilio.rest.trunking.v1.trunk.recording.RecordingList
2626
:rtype: twilio.rest.trunking.v1.trunk.recording.RecordingList
@@ -66,7 +66,7 @@ def __init__(self, version, response, solution):
6666
6767
:param Version version: Version that contains the resource
6868
:param Response response: Response from the API
69-
:param trunk_sid: The trunk_sid
69+
:param trunk_sid: The unique string that identifies the resource
7070
7171
:returns: twilio.rest.trunking.v1.trunk.recording.RecordingPage
7272
:rtype: twilio.rest.trunking.v1.trunk.recording.RecordingPage
@@ -126,14 +126,19 @@ def fetch(self):
126126

127127
return RecordingInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], )
128128

129-
def update(self):
129+
def update(self, mode=values.unset, trim=values.unset):
130130
"""
131131
Update the RecordingInstance
132132
133+
:param RecordingInstance.RecordingMode mode: The recording mode for the trunk.
134+
:param RecordingInstance.RecordingTrim trim: The recording trim setting for the trunk.
135+
133136
:returns: The updated RecordingInstance
134137
:rtype: twilio.rest.trunking.v1.trunk.recording.RecordingInstance
135138
"""
136-
payload = self._version.update(method='POST', uri=self._uri, )
139+
data = values.of({'Mode': mode, 'Trim': trim, })
140+
141+
payload = self._version.update(method='POST', uri=self._uri, data=data, )
137142

138143
return RecordingInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], )
139144

@@ -171,12 +176,7 @@ def __init__(self, version, payload, trunk_sid):
171176
super(RecordingInstance, self).__init__(version)
172177

173178
# Marshaled Properties
174-
self._properties = {
175-
'mode': payload.get('mode'),
176-
'trim': payload.get('trim'),
177-
'url': payload.get('url'),
178-
'trunk_sid': payload.get('trunk_sid'),
179-
}
179+
self._properties = {'mode': payload.get('mode'), 'trim': payload.get('trim'), }
180180

181181
# Context
182182
self._context = None
@@ -211,22 +211,6 @@ def trim(self):
211211
"""
212212
return self._properties['trim']
213213

214-
@property
215-
def url(self):
216-
"""
217-
:returns: The url
218-
:rtype: unicode
219-
"""
220-
return self._properties['url']
221-
222-
@property
223-
def trunk_sid(self):
224-
"""
225-
:returns: The trunk_sid
226-
:rtype: unicode
227-
"""
228-
return self._properties['trunk_sid']
229-
230214
def fetch(self):
231215
"""
232216
Fetch the RecordingInstance
@@ -236,14 +220,17 @@ def fetch(self):
236220
"""
237221
return self._proxy.fetch()
238222

239-
def update(self):
223+
def update(self, mode=values.unset, trim=values.unset):
240224
"""
241225
Update the RecordingInstance
242226
227+
:param RecordingInstance.RecordingMode mode: The recording mode for the trunk.
228+
:param RecordingInstance.RecordingTrim trim: The recording trim setting for the trunk.
229+
243230
:returns: The updated RecordingInstance
244231
:rtype: twilio.rest.trunking.v1.trunk.recording.RecordingInstance
245232
"""
246-
return self._proxy.update()
233+
return self._proxy.update(mode=mode, trim=trim, )
247234

248235
def __repr__(self):
249236
"""

twilio/twiml/voice_response.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ def conference(self, name, muted=None, beep=None,
12511251
status_callback_method=None, recording_status_callback=None,
12521252
recording_status_callback_method=None,
12531253
recording_status_callback_event=None, event_callback_url=None,
1254-
**kwargs):
1254+
jitter_buffer_size=None, participant_label=None, **kwargs):
12551255
"""
12561256
Create a <Conference> element
12571257
@@ -1274,6 +1274,8 @@ def conference(self, name, muted=None, beep=None,
12741274
:param recording_status_callback_method: Recording status callback URL method
12751275
:param recording_status_callback_event: Recording status callback events
12761276
:param event_callback_url: Event callback URL
1277+
:param jitter_buffer_size: Size of jitter buffer for participant
1278+
:param participant_label: A label for participant
12771279
:param kwargs: additional attributes
12781280
12791281
:returns: <Conference> element
@@ -1298,6 +1300,8 @@ def conference(self, name, muted=None, beep=None,
12981300
recording_status_callback_method=recording_status_callback_method,
12991301
recording_status_callback_event=recording_status_callback_event,
13001302
event_callback_url=event_callback_url,
1303+
jitter_buffer_size=jitter_buffer_size,
1304+
participant_label=participant_label,
13011305
**kwargs
13021306
))
13031307

0 commit comments

Comments
 (0)
0