I've got a custom content type "Publications" with custom fields. Two of these fields are: DOI (document object identifier), a unique identifier for the publication Altmetrics, the total "online attention" provided by Altmetric.com's API.

I'm wondering if there is a way via Drupal to automatically update each Publication node daily with the current online attention?

An example of a DOI is: 10.1073/pnas.0913149107

The corresponding API call would be: http://api.altmetric.com/v1/doi/10.1073/pnas.0913149107

The JSON data I'm looking for is object/score (which is currently 176.122).

As you can see the API call would have to use data from the Node. I've looked at Feeds and Feeds extensible parsers but I'm not sure how to make it work.

  • Update: Just to see if it was possible, I wrote a php script that accomplishes the above, but it accesses mysql directly. Although I think I could add a cron job to schedule this script daily, I'm pretty sure reading and updating mysql from php is not a good practice in Drupal - but I just wanted to say the logic and php code exists to do what I need....just looking for some advice on how best to implement using Drupal. – B. Swans Jun 20 '16 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.