eblondel / zen4R

zen4R - R Interface to Zenodo REST API
https://github.com/eblondel/zen4R/wiki
Other
44 stars 14 forks source link

Get related_identifiers and their relation deprecated? #168

Closed rkrug closed 2 weeks ago

rkrug commented 2 weeks ago

Hi I am running

 ipbes_zenodo <- zen$getRecords(q = "communities:ipbes", size = 1000)

to get all records in the community ipbes. Now I would like to build the network based on the related_identifiers - but I do not find the field anymore? As it is in Zenodo, I expect that I can get it with getRecords() as well?

The code

relations <- lapply(
    ipbes_zenodo,
    function(record) {
      relation <- record$metadata$related_identifiers
      if (is.null(relation)) {
        return(NULL)
      }
      result <- record$metadata$related_identifiers |>
        dplyr::bind_rows() |>
        dplyr::mutate(
          year = record$metadata$publication_date,
          doi = record$metadata$doi,
          title = record$metadata$title,
          keywords = record$metadata$keywords |>
            unlist() |>
            paste(collapse = "; "),
        )
      return(result)
    }
  )

was working some time ago (old API?)

Am I missing =something here?

Thanks,

Rainer