10000 [Librarian] Regenerated @ 72a4a03cce4b243aa46f00ba60b80ffae1ffcb31 · anilktechie/twilio-python@fdcdda2 · GitHub
[go: up one dir, main page]

Skip to content

Commit fdcdda2

Browse files
committed
[Librarian] Regenerated @ 72a4a03cce4b243aa46f00ba60b80ffae1ffcb31
1 parent 72dca48 commit fdcdda2

File tree

10 files changed

+609
-15
lines changed

10 files changed

+609
-15
lines changed

CHANGES.md

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

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

6+
[2019-01-02] Version 6.22.1
7+
----------------------------
8+
**Insights**
9+
- Initial revision.
10+
11+
612
[2018-12-17] Version 6.22.0
713
----------------------------
814
**Authy**

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (C) 2018, Twilio, Inc. <help@twilio.com>
3+
Copyright (C) 2019, Twilio, Inc. <help@twilio.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class CallSummaryTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.insights.v1.summary(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Summary',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35+
"call_type": "carrier",
36+
"call_state": "ringing",
37+
"processing_state": "complete",
38+
"direction": "inbound",
39+
"disconnected_by": "callee",
40+
"start_time": "2015-07-30T20:00:00Z",
41+
"end_time": "2015-07-30T20:00:00Z",
42+
"duration": 100,
43+
"connect_duration": 99,
44+
"from": {},
45+
"to": {},
46+
"carrier_edge": {},
47+
"client_edge": {},
48+
"sip_edge": {},
49+
"tags": [
50+
"tags"
51+
],
52+
"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
53+
}
54+
'''
55+
))
56+
57+
actual = self.client.insights.v1.summary(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
58+
59+
self.assertIsNotNone(actual)

twilio/rest/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def __init__(self, username=None, password=None, account_sid=None, region=None,
7474
self._studio = None
7575
self._verify = None
7676
self._voice = None
77+
self._insights = None
7778

7879
def request(self, method, uri, params=None, data=None, headers=None, auth=None,
7980
timeout=None, allow_redirects=False):
@@ -412,6 +413,19 @@ def voice(self):
412413
self._voice = Voice(self)
413414
return self._voice
414415

416+
@property
417+
def insights(self):
418+
"""
419+
Access the Insights Twilio Domain
420+
421+
:returns: Insights Twilio Domain
422+
:rtype: twilio.rest.insights.Insights
423+
"""
424+
if self._insights is None:
425+
from twilio.rest.insights import Insights
426+
self._insights = Insights(self)
427+
return self._insights
428+
415429
@property
416430
def addresses(self):
417431
"""

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def create(self, credentials, friendly_name=values.unset,
118118
"""
119119
Create a new AwsInstance
120120
121-
:param unicode credentials: The credentials
122-
:param unicode friendly_name: The friendly_name
123-
:param unicode account_sid: The account_sid
121+
:param unicode credentials: String containing AWS access credentials with format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
122+
:param unicode friendly_name: A human readable description of this resource
123+
:param unicode account_sid: The Subaccount this Credential should be associated with.
124124
125125
:returns: Newly created AwsInstance
126126
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
@@ -143,7 +143,7 @@ def get(self, sid):
143143
"""
144144
Constructs a AwsContext
145145
146-
:param sid: The sid
146+
:param sid: Fetch by unique Credential Sid
147147
148148
:returns: twilio.rest.accounts.v1.credential.aws.AwsContext
149149
:rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
@@ -154,7 +154,7 @@ def __call__(self, sid):
154154
"""
155155
Constructs a AwsContext
156156
157-
:param sid: The sid
157+
:param sid: Fetch by unique Credential Sid
158158
159159
:returns: twilio.rest.accounts.v1.credential.aws.AwsContext
160160
:rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
@@ -218,7 +218,7 @@ def __init__(self, version, sid):
218218
Initialize the AwsContext
219219
220220
:param Version version: Version that contains the resource
221-
:param sid: The sid
221+
:param sid: Fetch by unique Credential Sid
222222
223223
:returns: twilio.rest.accounts.v1.credential.aws.AwsContext
224224
:rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
@@ -250,7 +250,7 @@ def update(self, friendly_name=values.unset):
250250
"""
251251
Update the AwsInstance
252252
253-
:param unicode friendly_name: The friendly_name
253+
:param unicode friendly_name: A human readable description of this resource
254254
255255
:returns: Updated AwsInstance
256256
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
@@ -327,47 +327,47 @@ def _proxy(self):
327327
@property
328328
def sid(self):
329329
"""
330-
:returns: The sid
330+
:returns: A 34 character string that uniquely identifies this resource.
331331
:rtype: unicode
332332
"""
333333
return self._properties['sid']
334334

335335
@property
336336
def account_sid(self):
337337
"""
338-
:returns: The account_sid
338+
:returns: AccountSid the Credential resource belongs to
339339
:rtype: unicode
340340
"""
341341
return self._properties['account_sid']
342342

343343
@property
344344
def friendly_name(self):
345345
"""
346-
:returns: The friendly_name
346+
:returns: A human readable description of this resource
347347
:rtype: unicode
348348
"""
349349
return self._properties['friendly_name']
350350

351351
@property
352352
def date_created(self):
353353
"""
354-
:returns: The date_created
354+
:returns: The date this resource was created
355355
:rtype: datetime
356356
"""
357357
return self._properties['date_created']
358358

359359
@property
360360
def date_updated(self):
361361
"""
362-
:returns: The date_updated
362+
:returns: The date this resource was last updated
363363
:rtype: datetime
364364
"""
365365
return self._properties['date_updated']
366366

367367
@property
368368
def url(self):
369369
"""
370-
:returns: The url
370+
:returns: The URI for this resource, relative to `https://accounts.twilio.com`
371371
:rtype: unicode
372372
"""
373373
return self._properties['url']
@@ -385,7 +385,7 @@ def update(self, friendly_name=values.unset):
385385
"""
386386
Update the AwsInstance
387387
388-
:param unicode friendly_name: The friendly_name
388+
:param unicode friendly_name: A human readable description of this resource
389389
390390
:returns: Updated AwsInstance
391391
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance

twilio/rest/insights/__init__.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from twilio.base.domain import Domain
10+
from twilio.rest.insights.v1 import V1
11+
12+
13+
class Insights(Domain):
14+
15+
def __init__(self, twilio):
16+
"""
17+
Initialize the Insights Domain
18+
19+
:returns: Domain for Insights
20+
:rtype: twilio.rest.insights.Insights
21+
"""
22+
super(Insights, self).__init__(twilio)
23+
24+
self.base_url = 'https://insights.twilio.com'
25+
26+
# Versions
27+
self._v1 = None
28+
29+
@property
30+
def v1(self):
31+
"""
32+
:returns: Version v1 of insights
33+
:rtype: twilio.rest.insights.v1.V1
34+
"""
35+
if self._v1 is None:
36+
self._v1 = V1(self)
37+
return self._v1
38+
39+
@property
40+
def summary(self):
41+
"""
42+
:rtype: twilio.rest.insights.v1.summary.CallSummaryList
43+
"""
44+
return self.v1.summary
45+
46+
def __repr__(self):
47+
"""
48+
Provide a friendly representation
49+
50+
:returns: Machine friendly representation
51+
:rtype: str
52+
"""
53+
return '<Twilio.Insights>'

twilio/rest/insights/v1/__init__.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from twilio.base.version import Version
10+
from twilio.rest.insights.v1.summary import CallSummaryList
11+
12+
13+
class V1(Version):
14+
15+
def __init__(self, domain):
16+
"""
17+
Initialize the V1 version of Insights
18+
19+
:returns: V1 version of Insights
20+
:rtype: twilio.rest.insights.v1.V1.V1
21+
"""
22+
super(V1, self).__init__(domain)
23+
self.version = 'v1'
24+
self._summary = None
25+
26+
@property
27+
def summary(self):
28+
"""
29+
:rtype: twilio.rest.insights.v1.summary.CallSummaryList
30+
"""
31+
if self._summary is None:
32+
self._summary = CallSummaryList(self)
33+
return self._summary
34+
35+
def __repr__(self):
36+
"""
37+
Provide a friendly representation
38+
39+
:returns: Machine friendly representation
40+
:rtype: str
41+
"""
42+
return '<Twilio.Insights.V1>'

0 commit comments

Comments
 (0)
0