Skip to content

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

@asedeno

Description

@asedeno

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

Activity

asedeno

asedeno commented on Jul 12, 2018

@asedeno
Author

#10 will fix this.

asedeno

asedeno commented on Jan 8, 2019

@asedeno
Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @asedeno

        Issue actions

          client.outbound.completed(*ids) generates bad urls · Issue #9 · interfax/interfax-python