-
Notifications
You must be signed in to change notification settings - Fork 766
Next gen twiml #316
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
Next gen twiml #316
Conversation
twilio/twiml/__init__.py
Outdated
|
||
def append(self, verb): | ||
self.verbs.append(verb) | ||
return verb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nicer to return self
here.
response.append(Dial()).append(Sms())
twilio/twiml/__init__.py
Outdated
else: | ||
return xml | ||
|
||
def xml(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or prefix with _ if not public
method=None, | ||
action=None, | ||
status_callback=None, | ||
**kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...ew one line per param?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine and valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the other style where you keep them inline until the length limit then wrap to the next line. but not a big deal.
twilio/twiml/__init__.py
Outdated
|
||
return el | ||
|
||
def append(self, verb): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if its an instance of TwiML
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, it would help prevent mistakes.
twilio/twiml/__init__.py
Outdated
:return: | ||
""" | ||
if not isinstance(verb, TwiML): | ||
raise TwiMLException() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a message like "can't nest responses".
No description provided.