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

Api v3 client - ASM Groups endpoint #123

Merged
merged 8 commits into from
Sep 24, 2015

Conversation

thinkingserious
Copy link
Contributor

This adds the ASM groups endpoint and refactors the tests for better reusability.

thinkingserious added a commit that referenced this pull request Sep 24, 2015
Api v3 client - ASM Groups endpoint
@thinkingserious thinkingserious merged commit ceb2763 into sendgrid:api_v3_client Sep 24, 2015
if len(id) > 1:
count = 0
for i in id:
if count == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the pythonic way of writing this would be self._endpoint = self._endpoint + "?id=" + str(i) if count == 0 else self._endpoint + "&id=" + str(i)

Copy link

Choose a reason for hiding this comment

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

Or simply

self._endpoint += '?%s' % '&'.join('id=%s' % i for i in id)

Or using a proper library function, like urlquote.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep! That works too

@tushdante tushdante mentioned this pull request Oct 9, 2015
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