8000
We read every piece of feedback, and take your input very seriously.
2 parents 97a66c8 + f60e4b7 commit 59691b5Copy full SHA for 59691b5
docs/api/twiml.rst
@@ -42,7 +42,7 @@ Secondary Verbs
42
.. autoclass:: twilio.twiml.Pause
43
:members:
44
45
-.. autoclass:: twilio.twiml.Sms
+.. autoclass:: twilio.twiml.Message
46
47
48
.. autoclass:: twilio.twiml.Enqueue
docs/usage/twiml.rst
@@ -45,6 +45,25 @@ All attributes are keyword arguments.
<Play loop="3">https://api.twilio.com/cowbell.mp3</Play>
<Response>
+The Message and Sms verbs are slightly special: because :const:`from` is a
49
+Python keyword, use the :const:`sender` parameter to specify the number
50
+the message should come from:
51
+
52
+.. code-block:: python
53
54
+ from twilio import twiml
55
56
+ r = twiml.Response()
57
+ m = r.message("Hello MMS Monkey!", sender="+14155551234")
58
+ print str(r)
59
60
+.. code-block:: xml
61
62
+ <?xml version="1.0" encoding="utf-8"?>
63
+ <Response>
64
+ <Message from="+14155551234">Hello MMS Monkey!</Message>
65
66
67
Python 2.6+ added the :const:`with` statement for context management.
68
Using :const:`with`, the module can *almost* emulate Ruby blocks.
69