Skip to contents

Retrieve info from Figshare by URL

Usage

figshare_info(
  figshare_url,
  id_col = 1,
  host = "api.figshare.com",
  pb = NULL,
  cache = FALSE
)

Arguments

figshare_url

a Figshare URL or DOI, or a table containing them (e.g., as created by figshare_links())

id_col

the index or name of the column that contains Figshare URLs, if figshare_url is a table

host

the Figshare-compatible API host to query. Default "api.figshare.com"; researchdata4tu_info() calls this with "data.4tu.nl" instead (see the note at the top of this file).

pb

a progress bar passed from another function

cache

if TRUE, reuse a previously cached listing for an article already looked up (see repo_info_cache_clear()) instead of re-querying the API. Off by default.

Value

a data frame of information

Examples

# \donttest{
if (online("api.figshare.com")) {
    figshare_info("https://doi.org/10.6084/m9.figshare.18093368.v1")
}
#>                                      figshare_url figshare_id
#> 1 https://doi.org/10.6084/m9.figshare.18093368.v1    18093368
#>                 title                             doi     publication_date
#> 1 EFA Dataset of SCSW 10.6084/m9.figshare.18093368.v1 2022-01-09T11:04:08Z
#>           updated_date     authors   license
#> 1 2022-01-09T11:04:09Z Faiz Younas CC BY 4.0
#>                                                                                                                                                                                                       files
#> 1 32824292, Phase II EFA - Copy.csv, 20225, FALSE, https://ndownloader.figshare.com/files/32824292, 8eb092cff04dca2ef3ca2345d6c791e0, 8eb092cff04dca2ef3ca2345d6c791e0, text/plain, Phase II EFA - Copy.csv
# }