Skip to content

Commit

Permalink
Merge pull request #168 from Asana/openapi-sync
Browse files Browse the repository at this point in the history
Update memberships endpoints and Raw API Example in README.md
  • Loading branch information
jv-asana authored Mar 24, 2023
2 parents d57e0c4 + ec80492 commit 855eb6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ You can also use the raw API to fetch a page at a time:

offset = None
while True:
page = client.workspaces.get_workspaces(offset=offset, iterator_type=None)
page = client.workspaces.get_workspaces(offset=offset, iterator_type=None, full_payload=True)
print(page['data'])
if 'next_page' in page:
if 'next_page' in page and page['next_page']:
offset = page['next_page']['offset']
else:
break
Expand Down
6 changes: 4 additions & 2 deletions asana/resources/gen/memberships.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ def delete_membership(self, membership_gid, params=None, **options):
def get_memberships(self, params=None, **options):
"""Get multiple memberships
:param Object params: Parameters for the request
- parent {str}: (required) Globally unique identifier for `project`, `portfolio`, `team`, `goal`, and `workspace`.
- member {str}: Globally unique identifier for `team` and `user`.
- parent {str}: Globally unique identifier for `project`, `portfolio`, `team`, `goal`, and `workspace`.
- member {str}: Globally unique identifier for `team` or `user`.
- resource_subtype {str}: The resource_subtype to filter on. Must be provided with `member` and `workspace` if `parent` is not provided. Valid values include `team_membership`, `workspace_membership`, `portfolio_membership`
- workspace {str}: The workspace to filter on. Must be provided with `member` and `resource_subtype` if `parent` is not provided.
:param **options
- offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- limit {int}: Pagination limit for the request.
Expand Down
2 changes: 1 addition & 1 deletion asana/resources/gen/portfolios.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get_portfolios(self, params=None, **options):
"""Get multiple portfolios
:param Object params: Parameters for the request
- workspace {str}: (required) The workspace or organization to filter portfolios on.
- owner {str}: (required) The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own.
- owner {str}: The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own.
:param **options
- offset {str}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- limit {int}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
Expand Down

0 comments on commit 855eb6d

Please sign in to comment.