core_repos_search: Search CORE repositories

Description Usage Arguments Details References Examples

View source: R/core_repos_search.R

Description

Search CORE repositories

Usage

1
core_repos_search(query, page = 1, limit = 10, key = NULL, parse = TRUE, ...)

Arguments

query

(character) query string, required

page

(character) page number (default: 1), optional

limit

(character) records to return (default: 10, minimum: 10, maximum: 100), optional

key

A CORE API key. Get one at https://core.ac.uk/api-keys/register. Once you have the key, you can pass it into this parameter, or as a much better option, store your key as an environment variable with the name CORE_KEY or an R option as core_key. See ?Startup for how to work with env vars and R options

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

...

Curl options passed to HttpClient

Details

core_repos_search does the HTTP request and parses, while core_repos_search_ just does the HTTP request, gives back JSON as a character string

A POST method is allowed on this route, but it's not supported yet.

References

https://core.ac.uk/docs/#!/repositories/search

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
core_repos_search(query = 'mathematics')
core_repos_search(query = 'physics', parse = FALSE)
core_repos_search(query = 'pubmed')

core_repos_search_(query = 'pubmed')
library("jsonlite")
jsonlite::fromJSON(core_repos_search_(query = 'pubmed'))

## End(Not run)

rcoreoa documentation built on July 8, 2020, 7:30 p.m.