Skip to content
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

client.outbound.completed(*ids) generates bad urls #9

Open
asedeno opened this issue Jul 12, 2018 · 2 comments
Open

client.outbound.completed(*ids) generates bad urls #9

asedeno opened this issue Jul 12, 2018 · 2 comments

Comments

@asedeno
Copy link

asedeno commented Jul 12, 2018

When calling client.outbound.completed(*ids), the generated url has the IDs in a tuple:

>>> c.outbound.completed(123)
HTTPError: 400 Client Error: Bad Request for url: https://rest.interfax.net/outbound/faxes/completed?ids=%28123%2C%29
>>> c.outbound.completed(123,234)
HTTPError: 400 Client Error: Bad Request for url: https://rest.interfax.net/outbound/faxes/completed?ids=%28123%2C+234%29

This generated url does not conform with the API spec, where it should only be comma-separated, as:
https://rest.interfax.net/outbound/faxes/completed?ids=123%2C234

@asedeno
Copy link
Author

asedeno commented Jul 12, 2018

#10 will fix this.

@asedeno
Copy link
Author

asedeno commented Jan 8, 2019

Looping over the args and testing against the length on every iteration rather than just using ','.join() seems wasteful and non-pythonic. Please have another look at #10 for a better way.

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

No branches or pull requests

1 participant