ropensci / osfr

R interface to the Open Science Framework (OSF)
https://docs.ropensci.org/osfr
Other
143 stars 28 forks source link

Missing some files from osfr::osf_ls_files() #135

Closed JMankewitz closed 3 years ago

JMankewitz commented 3 years ago

Hello!

We have a public project at the address https://osf.io/pr6wu/, which has multiple subfolders (21!) which we need to interface with osfr::osf_download() and osfr::osf_upload()

However, when we run osfr::osf_retrieve_node("pr6wu") %>% osfr::osf_ls_files() we only get 10 of our 21 subfolders, so we can't access the other 11.

Any help would be great!

JMankewitz commented 3 years ago

Seems like there needs to be some page handling - see bottom of page here: https://api.osf.io/v2/nodes/pr6wu/files/osfstorage/ (there are 3 pages, with max 10 files each)

aaronwolen commented 3 years ago

Hi @JMankewitz, thanks for posting. You can set osf_ls_files()'s n_max argument to return more than 10 results. Let me know if that helps.

JMankewitz commented 3 years ago

Ah perfect, we'd missed that. Thanks !!

aaronwolen commented 3 years ago

Awesome. I'll close this but feel free to re-open if you run into other issues.