Skip to content

Commit

Permalink
list more than 1000 buckets #163
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Jul 7, 2022
1 parent 75f56fb commit efaa64b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Fix bug where retry was not attempted on `gcs_upload()`
* Add some custom error classes `http_400`, `http_404` etc.
* Allow listing of more than 1000 buckets (#163 - thanks @hidekoji)

# googleCloudStorage 0.7.0

Expand Down
5 changes: 4 additions & 1 deletion R/buckets.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ gcs_list_buckets <- function(projectId,
projection=projection),
data_parse_function = parse_lb)

out <- lb()
out <- gar_api_page(lb,
page_f = function(x) attr(x, "nextPageToken"),
page_method = "param",
page_arg = "pageToken")

if(nrow(out) < 1) return(NULL)

Expand Down

0 comments on commit efaa64b

Please sign in to comment.