Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue 341: Update return values for TwiML code. #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions twilio/twiml/messaging_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def message(self,
:param action: action URL
:param status_callback: callback URL
:param kwargs: other attributes
:return: <Message> element
:return: <Response> element
"""
return self.append(Message(
body=body,
Expand All @@ -49,7 +49,7 @@ def redirect(self, url, method=None, **kwargs):
:param url: URL to redirect to
:param method: HTTP method
:param kwargs: other attributes
:return: <Redirect> element
:return: <Response> element
"""
return self.append(Redirect(
method=method,
Expand Down Expand Up @@ -78,7 +78,7 @@ def body(self, body):
Add a <Body> element

:param body: body of message
:return: <Body> element
:return: <Message> element
"""
return self.append(Body(body))

Expand All @@ -87,7 +87,7 @@ def media(self, url):
Add a <Media> element

:param url: media URL
:return: <Media> element
:return: <Message> element
"""
return self.append(Media(url))

Expand Down
43 changes: 23 additions & 20 deletions twilio/twiml/voice_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def dial(self,
:param recording_status_callback: status callback URL
:param recording_status_callback_method: status callback URL method
:param kwargs: additional attributes
:return: <Dial> element
:return: <Response> element
"""
return self.append(Dial(
number=number,
Expand All @@ -64,6 +64,8 @@ def echo(self,
**kwargs):
"""
Add a new <Echo> element

:return: <Response> element
"""
return self.append(Echo(
**kwargs
Expand All @@ -87,7 +89,7 @@ def enqueue(self,
:param wait_url_method: wait URL method
:param workflow_sid: TaskRouter workflow SID
:param kwargs: additional attributes
:return: <Enqueue> element
:return: <Response> element
"""
return self.append(Enqueue(
name,
Expand Down Expand Up @@ -127,7 +129,7 @@ def gather(self,
:param barge_in: stop playing media upon speech
:param acknowledge_sound_url: url to hit when sound starts
:param kwargs: additional attributes
:return: <Gather> element
:return: <Response> element
"""
return self.append(Gather(
action=action,
Expand All @@ -142,15 +144,15 @@ def hangup(self):
"""
Add a new <Hangup> element

:return: <Hangup> element
:return: <Response> element
"""
return self.append(Hangup())

def leave(self):
"""
Add a new <Leave> element

:return: <Leave> element
:return: <Response> element
"""
return self.append(Leave())

Expand All @@ -159,7 +161,7 @@ def pause(self, length=None):
Add a new <Pause> element

:param length: time in seconds to pause
:return: <Pause> element
:return: <Response> element
"""
return self.append(Pause(length=length))

Expand All @@ -175,7 +177,7 @@ def play(self,
:param loop: times to loop
:param digits: play DTMF tones during a call
:param kwargs: additional attributes
:return: <Play> element
:return: <Response> element
"""
return self.append(Play(
url,
Expand Down Expand Up @@ -212,7 +214,7 @@ def record(self,
:param transcribe: transcribe the recording
:param transcribe_callback: transcribe callback URL
:param kwargs: additional attributes
:return: <Record> element
:return: <Response> element
"""
return self.append(Record(
action=action,
Expand All @@ -236,7 +238,7 @@ def redirect(self, url, method=None, **kwargs):
:param url: redirect url
:param method: redirect method
:param kwargs: additional attributes
:return: <Redirect> element
:return: <Response> element
"""
return self.append(Redirect(url, method=method, **kwargs))

Expand All @@ -246,7 +248,7 @@ def reject(self, reason=None, **kwargs):

:param reason: rejection reason
:param kwargs: additional attributes
:return: <Reject> element
:return: <Response> element
"""
return self.append(Reject(reason=reason, **kwargs))

Expand All @@ -264,7 +266,7 @@ def say(self,
:param language: language of message
:param voice: voice to use
:param kwargs: additional attributes
:return: <Say> element
:return: <Response> element
"""
return self.append(Say(
body,
Expand Down Expand Up @@ -292,7 +294,7 @@ def sms(self,
:param action: action URL
:param status_callback: status callback URL
:param kwargs: additional attributes
:return: <Sms> element
:return: <Response> element
"""
return self.append(Sms(
body,
Expand Down Expand Up @@ -338,7 +340,7 @@ def client(self,
:param status_callback_method: status callback URL method
:param status_callback: status callback URL
:param kwargs: additional attributes
:return: <Client> element
:return: <Dial> element
"""
return self.append(Client(
name,
Expand Down Expand Up @@ -388,7 +390,7 @@ def conference(self,
:param recording_status_callback: recording status callback URL
:param recording_status_callback_method: recording status callback URL method
:param kwargs: additional attributes
:return: <Conference> element
:return: <Dial> element
"""
return self.append(Conference(
name,
Expand Down Expand Up @@ -429,7 +431,7 @@ def number(self,
:param status_callback: status callback URL
:param status_callback_method: status callback URL method
:param kwargs: additional attributes
:return: <Number> element
:return: <Dial> element
"""
return self.append(Number(
number,
Expand Down Expand Up @@ -458,7 +460,7 @@ def queue(self,
:param reservation_sid: TaskRouter reservation SID
:param post_work_activity_sid: TaskRouter activity SID
:param kwargs: additional attributes
:return: <Queue> element
:return: <Dial> element
"""
return self.append(Queue(
queue_name,
Expand All @@ -476,6 +478,7 @@ def sim(self,
Add a <Sim> element

:param sid: sim sid
:return: <Dial> element
"""
return self.append(Sim(
sid,
Expand Down Expand Up @@ -504,7 +507,7 @@ def sip(self,
:param status_callback: status callback URL
:param status_callback_method: status callback URL method
:param kwargs: additional attributes
:return: <Sip> element
:return: <Dial> element
"""
return self.append(Sip(
uri,
Expand Down Expand Up @@ -685,7 +688,7 @@ def say(self,
:param language: message language
:param voice: voice to use
:param kwargs: additional attributes
:return: <Say> element
:return: <Gather> element
"""
return self.append(Say(
body,
Expand All @@ -707,7 +710,7 @@ def play(self,
:param loop: times to loop
:param digits: digits to simulate
:param kwargs: additional attributes
:return: <Play> element
:return: <Gather> element
"""
return self.append(Play(
url,
Expand All @@ -721,7 +724,7 @@ def pause(self, length=None):
Add a new <Pause> element

:param length: time to pause
:return: <Pause> element
:return: <Gather> element
"""
return self.append(Pause(length=length))

Expand Down