8000 Next gen twiml by jingming · Pull Request #316 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 8 commits into from
Mar 7, 2017
Merged

Next gen twiml #316

merged 8 commits into from
Mar 7, 2017

Conversation

jingming
Copy link
Contributor
@jingming jingming commented Mar 2, 2017

No description provided.


def append(self, verb):
self.verbs.append(verb)
return verb
Copy link
Contributor

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())

else:
return xml

def xml(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs?

Copy link
Contributor

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):
Copy link 8000
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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.


return el

def append(self, verb):
Copy link
Contributor

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?

Copy link
Contributor

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.

8000
:return:
"""
if not isinstance(verb, TwiML):
raise TwiMLException()
Copy link
Contributor

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".

@codejudas codejudas merged commit b3e48e6 into next-gen Mar 7, 2017
@ilanbiala ilanbiala deleted the next-gen-twiml branch July 11, 2017 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0