ropensci / osfr

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

Registries search #155

Open rempsyc opened 11 months ago

rempsyc commented 11 months ago

Hello. I would like to perform an OSF registries search, because the website search feature is not working properly right now.

I am trying to identify the number of registries by a specific author, and OSF is currently not providing any meaningful results for those. So I am thinking, surely it would be easier with an API and an R package? :)

What I would like to do is e.g.,:

osf_registries(author = "Rémi Thériault") %>%
   nrow()

or

osf_retrieve_user("w7d23") %>%
   osf_registries()

Because it seems that osf_ls_nodes() currently only lists projects, not registrations:

library(osfr)
osf_retrieve_user("w7d23") %>%
  osf_ls_nodes() 
#> # A tibble: 10 × 3
#>    name                                                       id    meta        
#>    <chr>                                                      <chr> <list>      
#>  1 Ethics                                                     ycn7z <named list>
#>  2 Needs Orientations and Passion for Self-Help               kjsu9 <named list>
#>  3 Validating the Needs Orientation Scale (Growth vs. Defici… q2ce6 <named list>
#>  4 Data & Analyses                                            vfh4s <named list>
#>  5 Manuscript & Supplemental Materials                        9kza7 <named list>
#>  6 Montreal Replication Games: Replicating Adams et al. (202… 69px3 <named list>
#>  7 Phi, Fei, Fo, Fum: Effect Sizes for Categorical Data that… cg64s <named list>
#>  8 Does Trait-Self Control Moderate the Effect of Priming Mi… nzv6y <named list>
#>  9 Trait-Self Control Moderates the Effect of Priming Mindfu… cqbjy <named list>
#> 10 Testing                                                    sf5te <named list>

Created on 2023-10-19 with reprex v2.0.2

Is this already possible, or would that be possible eventually?

Related to #38