API connection


I looking into the option of  using  API to download the data for my institution, and I am having trouble accessing the data and token keys. I'm planning to use R as tool to connect the API. 



1 person likes this idea

Hey Claudia, I'm also having trouble retrieving in-depth responses from the api:

Using the rAltmetric package, I can perform the two major functions (altmetrics()) and (altmetric_data()) with no problem. However, is there a way to get more info than what I'm currently getting (which would be what is documented on the rAltmetrics OpenSci and GH: http://ropensci.github.io/rAltmetric/) when I perform a call. The information I’m referring to is in this sample api response: https://help.altmetric.com/support/solutions/articles/6000086844-sample-api-response. It includes more in-depth information about an article. Am I missing something important? I have an api key as well, but it produces the same results. Thank you for your help in advance!

Here's what I have so far:


url  <- "https://api.altmetric.com/v1/"
key <- “myKey"

altmetric_data(altmetrics(pmid = "/21148220",
          apikey = getOption(“myKey")))

path <- “should this be included?"

I don't want R to automatically turn character strings in factors variables, so I turned this feature off:

options(stringsAsFactors = FALSE)

Login or Signup to post a comment