8000 Merge pull request #176 from phalt/docs_update · madCode/twilio-python@6ddee97 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ddee97

Browse files
committed
Merge pull request twilio#176 from phalt/docs_update
Major docs update
2 parents ff46bfa + 81e06d9 commit 6ddee97

File tree

12 files changed

+39
-25
lines changed

12 files changed

+39
-25
lines changed

docs/usage/caller-ids.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Caller Ids
88
Validate a Phone Number
99
-----------------------
1010

11-
Validating a phone number is quick and easy.
11+
Validating a phone number can be done with the Python helper library.
12+
13+
The code block below provides a simple example.
1214

1315
.. code-block:: python
1416
@@ -19,7 +21,7 @@ Validating a phone number is quick and easy.
1921
AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY"
2022
2123
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
22-
response = client.caller_ids.validate("+44 9876543212")
24+
response = client.caller_ids.validate("+449876543212")
2325
print response.validation_code
2426
2527
Twilio will call the provided number and wait for the validation code to be
@@ -28,12 +30,12 @@ entered.
2830
Delete a Phone Number
2931
---------------------
3032

31-
Deleting a phone number is quick and easy.
33+
Deleting a validated phone number is just as easy as validating.
3234

3335
.. code-block:: python
3436
3537
from twilio.rest import TwilioRestClient
36-
38+
3739
# To find these visit https://www.twilio.com/user/account
3840
account = "ACXXXXXXXXXXXXXXXXX"
3941
token = "YYYYYYYYYYYYYYYYYY"

docs/usage/conferences.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Conferences and Participants
55
==============================
66

7+
The :class:`Conference` resource manages all interaction with Twilio conferences, such as listing and managing participants.
78
For more information, see the `Conference REST Resource <http://www.twilio.com/docs/api/rest/conference>`_ and `Participant REST Resource <http://www.twilio.com/docs/api/rest/participant>`_ documentation.
89

910

docs/usage/messages.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
Messages
55
============
66

7-
For more information, see the
8-
`SMS Message REST Resource <http://www.twilio.com/docs/api/rest/sms>`_
7+
The :class:`Messages` resource manages all interaction with Twilio SMS and MMS messages. For more information, see the
8+
`Message REST Resource <http://www.twilio.com/docs/api/rest/message>`_
99
documentation.
1010

1111

1212
Sending a Text Message
1313
----------------------
1414

15-
Send a text message in only a few lines of code.
15+
The :class:`Message` resource allows you to send an SMS message in a few lines of code.
1616

1717
.. code-block:: python
1818
@@ -40,7 +40,9 @@ to your short code's number.
4040
Sending a Picture Message
4141
-------------------------
4242

43-
To send a picture, set :attr:`media_url` to the url of the picture you wish to send.
43+
To send a picture message (MMS), set :attr:`media_url` to the url of the picture you wish to send.
44+
45+
Don't forget to check the `availability of MMS in your area <https://www.twilio.com/mms>`_ before using this functionality.
4446

4547
.. code-block:: python
4648

docs/usage/notifications.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Notifications
55
====================
66

7+
A :class:`Notification` resource represents a single log entry made by Twilio in the course of handling your calls or your use of the REST API.
78
For more information, see the `Notifications REST Resource
89
<http://www.twilio.com/docs/api/rest/notification>`_ documentation.
910

docs/usage/phone-calls.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ Phone Calls
55
=====================
66

77
The :class:`Calls` resource manages all interaction with Twilio phone calls,
8-
including the creation and termination of phone calls.
8+
including the creation and termination of phone calls. For more information, see the `Calls REST Resource <http://www.twilio.com/docs/api/rest/call>`_
9+
documentation.
910

1011

1112
Making a Phone Call
1213
-------------------
1314

1415
The :class:`Calls` resource allows you to make outgoing calls. Before a call
1516
can be successfully started, you'll need a to set up a url endpoint which
16-
outputs valid `TwiML <http://www.twilio.com/docs/api/twiml/>`_.
17+
outputs valid `TwiML <http://www.twilio.com/docs/api/twiml/>`_. This can be done with the :class: `twiml.Response` class, `get started here <http://twilio-python.readthedocs.org/en/latest/usage/twiml.html#twiml-creation>`_.
1718

1819
.. code-block:: python
1920

docs/usage/phone-numbers.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Phone Numbers
55
=================
66

7-
With Twilio you can search and buy real phone numbers, just using the API.
7+
With Twilio you can search and buy real phone numbers using the API.
88

99
For more information, see the
1010
`IncomingPhoneNumbers REST Resource
@@ -15,7 +15,7 @@ Searching and Buying a Number
1515
--------------------------------
1616

1717
Finding numbers to buy couldn't be easier.
18-
We first search for a number in area code 530.
18+
The example below searches for a number with US area code '530'.
1919
Once we find one, we'll purchase it for our account.
2020

2121
.. code-block:: python
@@ -137,7 +137,7 @@ shown in the first example).
137137
Updating Properties on a Number
138138
-------------------------------
139139

140-
To update the properties on a phone number, call :meth:`update`
140+
To update the properties on a phone number, such as the Voice URL, call :meth:`update`
141141
on the phone number object, with any of the parameters
142142
listed in the `IncomingPhoneNumbers Resource documentation
143143
<http://www.twilio.com/docs/api/rest/incoming-phone-numbers>`_
@@ -152,8 +152,8 @@ listed in the `IncomingPhoneNumbers Resource documentation
152152
153153
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
154154
for number in client.phone_numbers.list(api_version="2010-04-01"):
155-
number.update(voice_url="http://twimlets.com/holdmusic?" +
156-
"Bucket=com.twilio.music.ambient",
155+
number.update(voice_url="http://twimlets.com/holdmusic?" +
156+
"Bucket=com.twilio.music.ambient",
157157
status_callback="http://example.com/callback")
158158
159159

docs/usage/queues.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
Queues and Members
55
==============================
66

7-
For more information, see the
8-
`Queue REST Resource <http://www.twilio.com/docs/api/rest/queue>`_
9-
and `Member REST Resource <http://www.twilio.com/docs/api/rest/member>`_
10-
documentation.
7+
The :class:`Queue` resource allows you to query and manage the state of individual call queues.For more information, see the `Queue REST Resource <http://www.twilio.com/docs/api/rest/queue>`_.
8+
9+
The :class:`Members` resource is a subresource of a Queue resource. It represents the set of members currently in a queue. See the `Member REST Resource <http://www.twilio.com/docs/api/rest/member>`_ documentation for more information.
1110

1211

1312
Listing Queues

docs/usage/recordings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
================
44
Recordings
55
================
6-
6+
A :class:`Recording` resource represents an individually recorded call. Recordings are generated when you use the `Record <https://www.twilio.com/docs/api/twiml/record>`_ TwiML verb.
77
For more information, see the
88
`Recordings REST Resource <http://www.twilio.com/docs/api/rest/recording>`_
99
documentation.

docs/usage/sip.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ Sip In
55
Getting started with Sip
66
==========================
77

8-
If yo 10000 u're unfamiliar with SIP, please see the `SIP API Documentation
9-
<https://www.twilio.com/docs/api/rest/sip>`_ on our website.
8+
Connect your SIP endpoints to Twilio and start building voice apps with Twilio’s APIs and application stack. If you're unfamiliar with SIP, please see the `SIP API Documentation <https://www.twilio.com/docs/api/rest/sip>`_ on our website.
109

1110
Creating a Sip Domain
1211
=========================
1312

1413
The :class:`Domains` resource allows you to create a new domain. To
1514
create a new domain, you'll need to choose a unique domain that lives
1615
under sip.twilio.com. For example, dunder-mifflin-scranton.sip.twilio.com.
16+
For more information, see the `Domains resource documentation <https://www.twilio.com/docs/api/rest/domain>`_ on our website.
1717

1818
.. code-block:: python
1919

docs/usage/transcriptions.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Transcriptions
55
================
66

7+
A :class:`Transcription` resource represents a transcription of a recording. The transcription text itself is the result of converting an audio recording to readable text.
78
Transcriptions are generated from recordings via the
89
`TwiML <Record> verb <http://www.twilio.com/docs/api/twiml/record>`_.
910
Using the API, you can only read your transcription records.
@@ -15,7 +16,7 @@ For more information, see the `Transcriptions REST Resource
1516
Listing Your Transcriptions
1617
----------------------------
1718

18-
The following code will print out the length of each :class:`Transcription`.
19+
The following code will print out the transcription text of each :class:`Transcription`.
1920

2021
.. code-block:: python
2122
@@ -27,5 +28,5 @@ The following code will print out the length of each :class:`Transcription`.
2728
2829
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
2930
for transcription in client.transcriptions.list():
30-
print transcription.duration
31+
print transcription.transcriptiontext
3132

docs/usage/twiml.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ These methods return the verbs they create to ease creation of nested TwiML.
1313
To finish, call the :meth:`toxml` method on the :class:`Response`,
1414
which returns raw TwiML.
1515

16+
To get started with TwiML, read the `TwiML documentation <https://www.twilio.com/docs/api/twiml>`_ on our website.
17+
18+
The following code block creates a simple TwiML Response.
19+
1620
.. code-block:: python
1721
1822
from twilio import twiml
@@ -21,6 +25,8 @@ which returns raw TwiML.
2125
r.say("Hello")
2226
print str(r)
2327
28+
The output is perfectly formatted XML:
29+
2430
.. code-block:: xml
2531
2632
<?xml version="1.0" encoding="utf-8"?>

twilio/twiml.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
2-
Make sure to check out the TwiML overview and tutorial
2+
Make sure to check out the TwiML overview and tutorial at
3+
https://www.twilio.com/docs/api/twiml
34
"""
45
import xml.etree.ElementTree as ET
56

0 commit comments

Comments
 (0)
0