-
Notifications
You must be signed in to change notification settings - Fork 10
General update #2
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
Changes from all commits
3a2564e
e3ad255
a10a58e
49080c0
4da7195
5458388
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| __version__ = '0.8' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the version is now referenced in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems fine. Stripe puts there's into a |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| from .client import Client | ||
|
|
||
|
|
||
| class Page(Client): | ||
| """Page""" | ||
| def __init__(self, auth_token): | ||
| Client.__init__(self, auth_token) | ||
| self.path = 'pages/' | ||
|
|
||
| def list(self, page_type, params=None): | ||
| full_slug = '{}/'.format(page_type) | ||
| return self.api_get(slug=full_slug, params=params) | ||
|
|
||
| def get(self, page_type, page_slug, params=None): | ||
| full_slug = '{}/{}/'.format(page_type, page_slug) | ||
| return self.api_get(slug=full_slug, params=params) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,10 +10,15 @@ def __init__(self, auth_token): | |
| def all(self, params=None): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should. The path for |
||
| return self.api_get(params=params) | ||
|
|
||
| def search(self, query='', page=1, page_size=10): | ||
| params = { | ||
| 'query': query, | ||
| 'page': page, | ||
| 'page_size': page_size, | ||
| } | ||
| def get(self, slug): | ||
| full_slug = '{}/'.format(slug) | ||
| return self.api_get(slug=full_slug) | ||
|
|
||
| def search(self, query, params=None): | ||
| if not params: | ||
| params = { | ||
| 'query': query, | ||
| } | ||
| else: | ||
| params['query'] = query | ||
| return self.api_get(params=params) | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
Please update README to be current + accurate based on the changes in this PR