pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
155 stars 24 forks source link

Snapshots function doesn't support page and per_page parameters #217

Closed sasha-ruby closed 1 year ago

sasha-ruby commented 1 year ago

Current implementation of snapshots function does not support page and per_page parameters, which facilitate the pagination of the results, as well as setting the number of items to be returned per page. Consequently, the DO response always uses the default values of page = 1 and per_page = 20. In cases when there are more than 20 snapshots in the account, it is not possible to retrieve snapshots other than the first 20.

snapshots <- function(type = NULL, ...) {
    ...
}
Session Info ```r > sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.6.2 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] Rcpp_1.0.9 rstudioapi_0.14 magrittr_2.0.3 usethis_2.1.6 devtools_2.4.5 pkgload_1.3.2 [7] xtable_1.8-4 R6_2.5.1 rlang_1.0.6 fastmap_1.1.0 urlchecker_1.0.1 stringr_1.5.0 [13] tools_4.1.1 pkgbuild_1.4.0 sessioninfo_1.2.2 miniUI_0.1.1.1 cli_3.6.0 remotes_2.4.2 [19] htmltools_0.5.4 ellipsis_0.3.2 digest_0.6.31 lifecycle_1.0.3 crayon_1.5.2 processx_3.8.0 [25] shiny_1.7.4 purrr_1.0.1 callr_3.7.3 later_1.3.0 vctrs_0.5.1 htmlwidgets_1.6.1 [31] profvis_0.3.7 fs_1.5.2 promises_1.2.0.1 ps_1.7.2 glue_1.6.2 memoise_2.0.1 [37] cachem_1.0.6 mime_0.12 stringi_1.7.12 compiler_4.1.1 prettyunits_1.1.1 httpuv_1.6.8 ```
sasha-ruby commented 1 year ago

Thanks @pachadotdev for merging the PR, this issue can be closed.