-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create Calls resource #4
Conversation
This PR is ready for review. You will notice that while it makes the initial call, it doesn't do the next step of fetching the TwiML from the supplied URL when that call connects/fails, and it doesn't call the supplied URL when the call ends. This will all be done in #5 , I felt that this PR was getting too big and needed to be split out. |
return str(uuid.uuid4()).replace('-', '') | ||
|
||
def _get_timestamp(self): | ||
return datetime.now(tzlocal()).strftime('%a, %d %b %Y %H:%M:%S %z') |
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.
Is there a reason to prefer local time over UTC?
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.
No real reason, it's just what I'm used to using. We could very well use tzutc
instead. It's what their API seems to be using (+0000
)
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.
Left some minor comments. Looks good though. Thank you for breaking this up and not putting it all in one PR -- very much appreciated. :) |
@hodgestar comments should all be addressed. Ready for another review. |
👍 My suggestion for the tests was slightly different to what you implemented. The assertion method is cool, but each test has the same structure:
|
@hodgestar Isn't that what I implemented? The only function that has more than that is the one which checks for valid non-error responses when one but not the other field is excluded. |
…urce Create Calls resource
Create the
Calls
resource which allows creating calls. Only create thePOST
root method, as this is the only method that will be used.