10000 Reverting local change. · Stackdriver/twilio-python@1ac0461 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 1, 2018. It is now read-only.

Commit 1ac0461

Browse files
committed
Reverting local change.
2 parents 2410adf + 9a445a0 commit 1ac0461

Some content is hidden

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

83 files changed

+3016
-4485
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ parts
1010
bin
1111
develop-eggs
1212
.installed.cfg
13+
scratch
14+
env
1315

1416
# Installer logs
1517
pip-log.txt
@@ -22,3 +24,8 @@ pip-log.txt
2224

2325
# Sphinx
2426
docs/tmp
27+
docs/_build
28+
cover
29+
30+
# tools
31+
.idea

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ python:
33
- "2.5"
44
- "2.6"
55
- "2.7"
6+
- "3.2"
67
install:
78
- pip install . --use-mirrors
89
- pip install -r requirements.txt --use-mirrors

CHANGES

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,55 @@ twilio-python Changelog
33

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

6+
Version 3.4.3
7+
-------------
8+
9+
Adds correct dependencies to the `setup.py` file.
10+
11+
Version 3.4.2
12+
-------------
13+
14+
Released on January 2, 2013
15+
16+
Adds a convenience function to retrieve the members of a queue by running
17+
client.members("QU123").
18+
19+
Version 3.4.1
20+
-------------
21+
22+
Python3 support!
23+
24+
Version 3.3.11
25+
--------------
26+
27+
- Fix a bug where participants could not be kicked from a Conference
28+
29+
30+
Version 3.3.10
31+
--------------
32+
33+
- Add support for Queue. Fix a bug where the library wouldn't work in Python 2.5
34+
35+
36+
Version 3.3.9
37+
-------------
38+
39+
- Fix an error introduced in 3.3.7 that prevented validation calls from
40+
succeeding.
41+
42+
Version 3.3.8
43+
-------------
44+
45+
- Use next_page_uri when iterating over a list resource
46+
47+
48+
Version 3.3.7
49+
-------------
50+
51+
- Allow arbitrary keyword arguments on resource creation and listing
52+
653
Version 3.3.6
7-
-----------
54+
-------------
855

956
- Remove doc/tmp directory which was preventing installation on certain Windows machines
1057
- Add Travis CI integration
@@ -15,7 +62,7 @@ Version 3.3.5
1562

1663
Released on January 18, 2011
1764

18-
- Fix a bug with the depreacted `TwilioRestClient.request` method
65+
- Fix a bug with the deprecated `TwilioRestClient.request` method
1966
- Fix a bug in filtering SMS messages by DateSent
2067

2168
Version 3.3.4

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ print call.sid
7676
```
7777

7878
### Send an SMS
79+
7980
```python
8081
from twilio.rest import TwilioRestClient
8182

@@ -112,3 +113,16 @@ The full power of the Twilio API is at your fingertips. The [full
112113
documentation](http://readthedocs.org/docs/twilio-python/en/latest/ "Twilio
113114
Python library documentation") explains all the awesome features available to
114115
use.
116+
117+
* [Retrieve Call Records][calls]
118+
* [Retrieve SMS Message Records][sms-messages]
119+
* [Search for a Phone Number][number]
120+
* [Buy a Number][number]
121+
* [Validate a Phone Number][validate]
122+
* [List Recordings][recordings]
123+
124+
[number]: http://twilio-python.readthedocs.org/en/latest/usage/phone-numbers.html#searching-and-buying-a-number
125+
[validate]: http://twilio-python.readthedocs.org/en/latest/usage/caller-ids.html
126+
[recordings]: http://twilio-python.readthedocs.org/en/latest/usage/recordings.html#listing-your-recordings
127+
[sms-messages]: http://twilio-python.readthedocs.org/en/latest/usage/messages.html#retrieving-sent-messages
128+
[calls]: http://twilio-python.readthedocs.org/en/latest/usage/phone-calls.html#retrieve-a-call-record

docs/api/rest/resources.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,74 @@ Phone Numbers
603603
.. attribute:: iso_country
604604

605605

606+
Queues
607+
>>>>>>>>>>>
608+
609+
.. autoclass:: twilio.rest.resources.Queues
610+
:members:
611+
:exclude-members: instance
612+
613+
.. autoclass:: twilio.rest.resources.Queue
614+
:members:
615+
616+
.. attribute:: sid
617+
618+
A 34 character string that uniquely identifies this queue.
619+
620+
.. attribute:: friendly_name
621+
622+
A user-provided string that identifies this queue.
623+
624+
.. attribute:: current_size
625+
626+
The count of calls currently in the queue.
627+
628+
.. attribute:: max_size
629+
630+
The upper limit of calls allowed to be in the queue.
631+
`unlimited` is an option. The default is 100.
632+
633+
.. attribute:: average_wait_time
634+
635+
The average wait time of the members of this queue in seconds.
636+
This is calculated at the time of the request.
637+
638+
.. attribute:: uri
639+
640+
The URI for this resource, relative to https://api.twilio.com.
641+
642+
643+
Queue Members
644+
>>>>>>>>>>>>>>
645+
646+
.. autoclass:: twilio.rest.resources.Members
647+
:members:
648+
:exclude-members: instance
649+
650+
.. autoclass:: twilio.rest.resources.Member
651+
:members:
652+
653+
.. attribute:: call_sid
654+
655+
A 34 character string that uniquely identifies the call that is enqueued.
656+
657+
.. attribute:: date_enqueued
658+
659+
The date that the member was enqueued, given in RFC 2822 format.
660+
661+
.. attribute:: wait_time
662+
663+
The number of seconds the member has been in the queue.
664+
665+
.. attribute:: position
666+
667+
This member’s current position in the queue.
668+
669+
.. attribute:: uri
670+
671+
The URI for this resource, relative to https://api.twilio.com.
672+
673+
606674
Recordings
607675
>>>>>>>>>>>
608676

docs/api/twiml.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Secondary Verbs
4343
.. autoclass:: twilio.twiml.Sms
4444
:members:
4545

46+
.. autoclass:: twilio.twiml.Enqueue
47+
:members:
48+
49+
.. autoclass:: twilio.twiml.Leave
50+
:members:
51+
4652
Nouns
4753
~~~~~~
4854

@@ -54,3 +60,6 @@ Nouns
5460

5561
.. autoclass:: twilio.twiml.Client
5662
:members:
63+
64+
.. autoclass:: twilio.twiml.Queue
65+
:members:

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
# built documents.
5656
#
5757
# The short X.Y version.
58-
version = '3.3'
58+
version = '3.4'
5959
# The full version, including alpha/beta/rc tags.
60-
release = '3.3.6'
60+
release = '3.4.3'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

docs/faq.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ the Terminal:
4242
which -a python
4343
which -a pip
4444
45-
``pip`` needs to install the Twilio library to a path that your Python executable
46-
can read from. Sometimes there will be more than one version of pip, like
47-
pip-2.5, pip-2.7 etc. You can find all of them by running ``compgen -c | grep
48-
pip``. There can also be more than one version of Python, especially if you have
49-
Macports or homebrew.
45+
``pip`` needs to install the Twilio library to a path that your Python
46+
executable can read from. Sometimes there will be more than one version of pip,
47+
like pip-2.5, pip-2.7 etc. You can find all of them by running ``compgen -c |
48+
grep pip`` (works with Bash on \*nix machines). There can also be more than one
49+
version of Python, especially if you have Macports or homebrew.
5050

5151
You also may be using an outdated version of the twilio-python library, which
5252
did not use a ``twilio.rest.TwilioRestClient`` object. Check which version of the
@@ -64,7 +64,7 @@ version, you can upgrade with this command:
6464
$ pip install --upgrade twilio
6565
6666
Note that if you have code that uses the older version of the library, it may
67-
breake when you upgrade your site.
67+
break when you upgrade your site.
6868

6969
Formatting phone numbers
7070
------------------------
@@ -99,7 +99,7 @@ Then you can convert user input to phone numbers like this:
9999
# Phone number may already be in E.164 format.
100100
parse_type = None
101101
else:
102-
# Assume it's a US number
102+
# If no country code information is present, assume it's a US number
103103
parse_type = "US"
104104
105105
phone_representation = phonenumbers.parse(raw_phone, parse_type)

docs/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
====================
1+
=============================
22
Twilio Python Helper Library
3-
====================
3+
=============================
44

55
Make requests to Twilio's `REST API <http://www.twilio.com/docs/api/twiml/>`_ and create `TwiML <http://www.twilio.com/docs/api/twiml/>`_ without a hassle. And you thought Twilio couldn't get any easier.
66

@@ -39,7 +39,7 @@ The :doc:`/getting-started` will get you up and running in a few quick minutes.
3939
User Guide
4040
==================
4141

42-
Functionality is split over three different sub-packages within **twilio-python**. Below are in-depth guide to specific portions of the library.
42+
Functionality is split over three different sub-packages within **twilio-python**. Below are in-depth guides to specific portions of the library.
4343

4444
REST API
4545
----------
@@ -59,7 +59,8 @@ Query the Twilio REST API to create phone calls, send SMS messages and so much m
5959
usage/notifications
6060
usage/recordings
6161
usage/transcriptions
62-
62+
usage/caller-ids
63+
usage/queues
6364
TwiML
6465
---------
6566

@@ -124,4 +125,3 @@ Report bugs using the Github `issue tracker <https://github.com/twilio/twilio-py
124125
If you have questions that aren't answered by this documentation, ask the `#twilio IRC channel <irc://irc.freenode.net/#twilio>`_
125126

126127
See the :doc:`/changelog` for version history.
127-

docs/usage/accounts.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ If it was just a misunderstanding, reenable their account.
7474
7575
Otherwise, close their account permanently.
7676

77-
.. warning::
78-
This action can't be undone.
79-
8077
.. code-block:: python
8178
8279
subaccount.close()
8380
81+
.. warning::
82+
This action can't be undone.
83+

docs/usage/applications.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ You can filter applications by FriendlyName
4646
Creating an Application
4747
-------------------------
4848

49-
When creating an application, no fields are required. We create an application with only a :attr:`friendly_name`. :meth:`Applications.create()` accepts many other arguments for url configuration.
49+
When creating an application, no fields are required. We create an application
50+
with only a :attr:`friendly_name`. The :meth:`Applications.create()` method
51+
accepts many other arguments for url configuration.
5052

5153
.. code-block:: python
5254
@@ -73,6 +75,7 @@ Updating an Application
7375
7476
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
7577
url = "http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient"
78+
app_sid = 'AP123' # the app you'd like to update
7679
application = client.applications.update(app_sid, voice_url=url)
7780
7881
@@ -87,5 +90,6 @@ Deleting an Application
8790
ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX"
8891
AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY"
8992
93+
app_sid = 'AP123' # the app you'd like to delete
9094
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
9195
client.applications.delete(app_sid)

docs/usage/basics.rst

Lines changed: 2 additions & 2 deletions
Original file line number F438 Diff line numberDiff line change
@@ -71,7 +71,7 @@ Listing All Resources
7171

7272
Sometimes you'd like to retrieve all records from a list resource. Instead of manually paging over the resource, the :class:`resources.ListResource.iter` method returns a generator. After exhausting the current page, the generator will request the next page of results.
7373

74-
.. warning:: Accessing all your records can be slow. We suggest only doing so when you absolutely need all the records
74+
.. warning:: Accessing all your records can be slow. We suggest only doing so when you absolutely need all the records.
7575

7676
.. code-block:: python
7777
@@ -102,5 +102,5 @@ To get an individual instance resource, use :class:`resources.ListResource.get`.
102102
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
103103
104104
call = client.calls.get("CA123")
105-
print call.sid
105+
print call.to
106106

docs/usage/caller-ids.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.. module:: twilio.rest.resources
2+
3+
=================
4+
Caller Ids
5+
=================
6+
7+
Validate a Phone Number
8+
-----------------------
9+
10+
Validating a phone number is quick and easy.
11+
12+
.. code-block:: python
13+
14+
from twilio.rest import TwilioRestClient
15+
16+
# To find these visit https://www.twilio.com/user/account
17+
ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX"
18+
AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY"
19+
20+
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
21+
response = client.caller_ids.validate("+44 9876543212")
22+
print response.validation_code
23+
24+
Twilio will call the provided number and wait for the validation code to be
25+
entered.
26+
27+
Delete a Phone Number
28+
---------------------
29+
30+
Deleting a phone number is quick and easy.
31+
32+
.. code-block:: python
33+
34+
from twilio.rest import TwilioRestClient
35+
36+
# To find these visit https://www.twilio.com/user/account
37+
account = "ACXXXXXXXXXXXXXXXXX"
38+
token = "YYYYYYYYYYYYYYYYYY"
39+
client = TwilioRestClient(account, token)
40+
41+
response = client.caller_ids.list(phone_number="+15555555555")
42+
callerid = response[0]
43+
callerid.delete()

0 commit comments

Comments
 (0)
0