8000 Regenerate for RC13 · Muix2015/twilio-python@cfb9efa · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cfb9efa

Browse files
committed
Regenerate for RC13
1 parent b3e48e6 commit cfb9efa

File tree

165 files changed

+2767
-2795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+2767
-2795
lines changed

CHANGES.md

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

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

6+
Version 6.0rc13
7+
--------------
8+
9+
Released March 07, 2017:
10+
11+
- Support regional Twilio hostnames.
12+
- Improve `rtype` documentation throughout.
13+
- Remove obsolete Sandbox resource.
14+
- Improve TwiML helper resources.
15+
- Support date inequality parameters by expanding into before, equal, after parameters in python.
16+
- Reorganize common modules into `base` folder.
17+
- Add TaskRouter grant.
18+
- Document handwritten classes.
19+
- Switch to using `requests` library over `httplib2`.
20+
- Fix docs generation.
21+
- Support client validation.
22+
623
Version 6.0rc8
724
-------------
825

tests/integration/api/v2010/test_account.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def test_create_response(self):
4545
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
4646
"outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json",
4747
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
48-
"sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json",
4948
"sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json",
5049
"transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json"
5150
},
@@ -90,7 +89,6 @@ def test_fetch_response(self):
9089
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
9190
"outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json",
9291
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
93-
"sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json",
9492
"sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json",
9593
"transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json"
9694
},
@@ -143,7 +141,6 @@ def test_read_full_response(self):
143141
"outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json",
144142
"queues": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues.json",
145143
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
146-
"sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json",
147144
"sip": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP.json",
148145
"sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json",
149146
"transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json",
@@ -228,7 +225,6 @@ def test_update_response(self):
228225
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
229226
"outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json",
230227
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
231-
"sandbox": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sandbox.json",
232228
"sms_messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/Messages.json",
233229
"transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json"
234230
},

twilio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version_info__ = ('6', '0', '0rc12')
1+
__version_info__ = ('6', '0', '0rc13')
22
__version__ = '.'.join(__version_info__)

twilio/rest/__init__.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
class Client(object):
1717
""" A client for accessing the Twilio API. """
1818

19-
def __init__(self, username=None, password=None, account_sid=None,
19+
def __init__(self, username=None, password=None, account_sid=None, region=None,
2020
http_client=None, environment=None):
2121
"""
2222
Initializes the Twilio Client
2323
2424
:param str username: Username to authenticate with
2525
:param str password: Password to authenticate with
2626
:param str account_sid: Account Sid, defaults to Username
27+
:param str region: Twilio Region to make requests to
2728
:param HttpClient http_client: HttpClient, defaults to TwilioHttpClient
2829
:param dict environment: Environment to look for auth details, defaults to os.environ
2930
@@ -38,6 +39,8 @@ def __init__(self, username=None, password=None, account_sid=None,
3839
""" :type : str """
3940
self.account_sid = account_sid or self.username
4041
""" :type : str """
42+
self.region = region
43+
""" :type : str """
4144

4245
if not self.username or not self.password:
4346
raise TwilioException("Credentials are required to create a TwilioClient")
@@ -95,6 +98,10 @@ def request(self, method, uri, params=None, data=None, headers=None, auth=None,
9598
if 'Accept' not in headers:
9699
headers['Accept'] = 'application/json'
97100

101+
if self.region:
102+
head, tail = uri.split('.', 1)
103+
uri = '.'.join([head, self.region, tail])
104+
98105
return self.http_client.request(
99106
method,
100107
uri,
@@ -273,168 +280,161 @@ def account(self):
273280
@property
274281
def addresses(self):
275282
"""
276-
:rtype: AddressList
283+
:rtype: twilio.rest.api.v2010.account.address.AddressList
277284
"""
278285
return self.account.addresses
279286

280287
@property
281288
def applications(self):
282289
"""
283-
:rtype: ApplicationList
290+
:rtype: twilio.rest.api.v2010.account.application.ApplicationList
284291
"""
285292
return self.account.applications
286293

287294
@property
288295
def authorized_connect_apps(self):
289296
"""
290-
:rtype: AuthorizedConnectAppList
297+
:rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList
291298
"""
292299
return self.account.authorized_connect_apps
293300

294301
@property
295302
def available_phone_numbers(self):
296303
"""
297-
:rtype: AvailablePhoneNumberCountryList
304+
:rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList
298305
"""
299306
return self.account.available_phone_numbers
300307

301308
@property
302309
def calls(self):
303310
"""
304-
:rtype: CallList
311+
:rtype: twilio.rest.api.v2010.account.call.CallList
305312
"""
306313
return self.account.calls
307314

308315
@property
309316
def conferences(self):
310317
"""
311-
:rtype: ConferenceList
318+
:rtype: twilio.rest.api.v2010.account.conference.ConferenceList
312319
"""
313320
return self.account.conferences
314321

315322
@property
316323
def connect_apps(self):
317324
"""
318-
:rtype: ConnectAppList
325+
:rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppList
319326
"""
320327
return self.account.connect_apps
321328

322329
@property
323330
def incoming_phone_numbers(self):
324331
"""
325-
:rtype: IncomingPhoneNumberList
332+
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList
326333
"""
327334
return self.account.incoming_phone_numbers
328335

329336
@property
330337
def keys(self):
331338
"""
332-
:rtype: KeyList
339+
:rtype: twilio.rest.api.v2010.account.key.KeyList
333340
"""
334341
return self.account.keys
335342

336343
@property
337344
def messages(self):
338345
"""
339-
:rtype: MessageList
346+
:rtype: twilio.rest.api.v2010.account.message.MessageList
340347
"""
341348
return self.account.messages
342349

343350
@property
344351
def new_keys(self):
345352
"""
346-
:rtype: NewKeyList
353+
:rtype: twilio.rest.api.v2010.account.new_key.NewKeyList
347354
"""
348355
return self.account.new_keys
349356

350357
@property
351358
def new_signing_keys(self):
352359
"""
353-
:rtype: NewSigningKeyList
360+
:rtype: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList
354361
"""
355362
return self.account.new_signing_keys
356363

357364
@property
358365
def notifications(self):
359366
"""
360-
:rtype: NotificationList
367+
:rtype: twilio.rest.api.v2010.account.notification.NotificationList
361368
"""
362369
return self.account.notifications
363370

364371
@property
365372
def outgoing_caller_ids(self):
366373
"""
367-
:rtype: OutgoingCallerIdList
374+
:rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList
368375
"""
369376
return self.account.outgoing_caller_ids
370377

371378
@property
372379
def queues(self):
373380
"""
374-
:rtype: QueueList
381+
:rtype: twilio.rest.api.v2010.account.queue.QueueList
375382
"""
376383
return self.account.queues
377384

378385
@property
379386
def recordings(self):
380387
"""
381-
:rtype: RecordingList
388+
:rtype: twilio.rest.api.v2010.account.recording.RecordingList
382389
"""
383390
return self.account.recordings
384391

385-
@property
386-
def sandbox(self):
387-
"""
388-
:rtype: SandboxList
389-
"""
390-
return self.account.sandbox
391-
392392
@property
393393
def signing_keys(self):
394394
"""
395-
:rtype: SigningKeyList
395+
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList
396396
"""
397397
return self.account.signing_keys
398398

399399
@property
400400
def sip(self):
401401
"""
402-
:rtype: SipList
402+
:rtype: twilio.rest.api.v2010.account.sip.SipList
403403
"""
404404
return self.account.sip
405405

406406
@property
407407
def short_codes(self):
408408
"""
409-
:rtype: ShortCodeList
409+
:rtype: twilio.rest.api.v2010.account.short_code.ShortCodeList
410410
"""
411411
return self.account.short_codes
412412

413413
@property
414414
def tokens(self):
415415
"""
416-
:rtype: TokenList
416+
:rtype: twilio.rest.api.v2010.account.token.TokenList
417417
"""
418418
return self.account.tokens
419419

420420
@property
421421
def transcriptions(self):
422422
"""
423-
:rtype: TranscriptionList
423+
:rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList
424424
"""
425425
return self.account.transcriptions
426426

427427
@property
428428
def usage(self):
429429
"""
430-
:rtype: UsageList
430+
:rtype: twilio.rest.api.v2010.account.usage.UsageList
431431
"""
432432
return self.account.usage
433433

434434
@property
435435
def validation_requests(self):
436436
"""
437-
:rtype: ValidationRequestList
437+
:rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestList
438438
"""
439439
return self.account.validation_requests
440440

twilio/rest/accounts/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, twilio):
3030
def v1(self):
3131
"""
3232
:returns: Version v1 of accounts
33-
:rtype: V1
33+
:rtype: twilio.rest.accounts.v1.V1
3434
"""
3535
if self._v1 is None:
3636
self._v1 = V1(self)
@@ -39,7 +39,7 @@ def v1(self):
3939
@property
4040
def credentials(self):
4141
"""
42-
:rtype: CredentialList
42+
:rtype: twilio.rest.accounts.v1.credential.CredentialList
4343
"""
4444
return self.v1.credentials
4545

twilio/rest/accounts/v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, domain):
2626
@property
2727
def credentials(self):
2828
"""
29-
:rtype: CredentialList
29+
:rtype: twilio.rest.accounts.v1.credential.CredentialList
3030
"""
3131
if self._credentials is None:
3232
self._credentials = CredentialList(self)

twilio/rest/accounts/v1/credential/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def __init__(self, version):
2020
2121
:param Version version: Version that contains the resource
2222
23-
:returns: CredentialList
24-
:rtype: CredentialList
23+
:returns: twilio.rest.accounts.v1.credential.CredentialList
24+
:rtype: twilio.rest.accounts.v1.credential.CredentialList
2525
"""
2626
super(CredentialList, self).__init__(version)
2727

@@ -36,8 +36,8 @@ def public_key(self):
3636
"""
3737
Access the public_key
3838
39-
:returns: PublicKeyList
40-
:rtype: PublicKeyList
39+
:returns: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
40+
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
4141
"""
4242
if self._public_key is None:
4343
self._public_key = PublicKeyList(
@@ -64,8 +64,8 @@ def __init__(self, version, response, solution):
6464
:param Version version: Version that contains the resource
6565
:param Response response: Response from the API
6666
67-
:returns: CredentialPage
68-
:rtype: CredentialPage
67+
:returns: twilio.rest.accounts.v1.credential.CredentialPage
68+
:rtype: twilio.rest.accounts.v1.credential.CredentialPage
6969
"""
7070
super(CredentialPage, self).__init__(version, response)
7171

@@ -78,8 +78,8 @@ def get_instance(self, payload):
7878
7979
:param dict payload: Payload response from the API
8080
81-
:returns: CredentialInstance
82-
:rtype: CredentialInstance
81+
:returns: twilio.rest.accounts.v1.credential.CredentialInstance
82+
:rtype: twilio.rest.accounts.v1.credential.CredentialInstance
8383
"""
8484
return CredentialInstance(
8585
self._version,
@@ -102,8 +102,8 @@ def __init__(self, version, payload):
102102
"""
103103
Initialize the CredentialInstance
104104
105-
:returns: CredentialInstance
106-
:rtype: CredentialInstance
105+
:returns: twilio.rest.accounts.v1.credential.CredentialInstance
106+
:rtype: twilio.rest.accounts.v1.credential.CredentialInstance
107107
"""
108108
super(CredentialInstance, self).__init__(version)
109109

0 commit comments

Comments
 (0)
0