Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added function osf_ls_preprints to list all preprints #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saudiwin
Copy link

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