Skip to content

Added function osf_ls_preprints to list all preprints#157

Open
saudiwin wants to merge 1 commit into
ropensci:masterfrom
saudiwin:master
Open

Added function osf_ls_preprints to list all preprints#157
saudiwin wants to merge 1 commit into
ropensci:masterfrom
saudiwin:master

Conversation

@saudiwin

Copy link
Copy Markdown

I added a function that retrieves all preprints (see https://developer.osf.io/#operation/users_preprints_list). I added this function because osf_ls_nodes does not return all preprints -- I think it only returns preprints if there is an associated OSF project. But preprints without projects won't come back. For me, this is a big difference (4 preprints vs. 19).

i.e., as in the following code:

library(osfr)

my_info <- osf_retrieve_user("xd74f")
my_nodes <- osf_ls_nodes(my_info,n_max=Inf)
my_preprints <- osf_ls_preprints(my_info,n_max = Inf)

I also added the back-end function .osf_user_preprints to make the required API call.

Happy to make any more required edits for the function.

… a user (see https://developer.osf.io/#operation/users_preprints_list). Also added back-end function .osf_user_preprints to make the required API call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant