Description Usage Arguments Details References Examples
Get repositories via their repository IDs
1 | core_repos(id, key = NULL, method = "GET", parse = TRUE, ...)
|
id |
(integer) One or more repository IDs. Required |
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
|
method |
(character) one of 'GET' (default) or 'POST' |
parse |
(logical) Whether to parse to list ( |
... |
Curl options passed to |
core_repos
does the HTTP request and parses, while
core_repos_
just does the HTTP request, gives back JSON as a
character string
These functions take one article ID at a time. Use lapply/loops/etc for many ids
https://core.ac.uk/docs/#!/repositories/getRepositoryById https://core.ac.uk/docs/#!/repositories/getRepositoryByIdBatch
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
core_repos(id = 507)
core_repos(id = 444)
ids <- c(507, 444, 70)
res <- lapply(ids, core_repos)
vapply(res, "[[", "", c("data", "name"))
# just http request, get json as character vector back
core_repos_(507)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.