Skip to content

Commit

Permalink
Merge pull request #11 from onna/page-args
Browse files Browse the repository at this point in the history
Support passing query params to iterate_bucket_page
  • Loading branch information
j-durbin authored May 16, 2023
2 parents fed1f60 + b4ce5b7 commit 384515c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
6.0.8 (unreleased)
------------------
- Support arbitrary args to iterate bucket page method, e.g. to include deleted versions.

6.0.7 (unreleased)
------------------
- Method for generating signed download URLs
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.7
6.0.8
4 changes: 2 additions & 2 deletions guillotina_gcloudstorage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,11 @@ async def iterate_bucket(self):
yield item
page_token = data.get("nextPageToken")

async def iterate_bucket_page(self, page_token=None, prefix=None):
async def iterate_bucket_page(self, page_token=None, prefix=None, **params):
url = "{}/{}/o".format(OBJECT_BASE_URL, await self.get_bucket_name())
container = task_vars.container.get()
prefix = prefix or container.id + "/"
params = {"prefix": prefix}
params.update({"prefix": prefix})
if page_token:
params["pageToken"] = page_token

Expand Down

0 comments on commit 384515c

Please sign in to comment.