Page MenuHomePhabricator

Add requestFromPMID() method to lib/request.js
Closed, ResolvedPublic

Description

In the file lib/request.js, currently there are only methods to get metadata from a journal paper from its URL or DOI. However, you can also find information using another identifier, PMID. You can use the PubMed API to find a paper's DOI given its PMID and therefore its url: http://www.ncbi.nlm.nih.gov/pmc/tools/id-converter-api/

Hint: use the "request" library: https://www.npmjs.org/package/request
Hint: JSON is a great format to use in conjunction with Javascript because it is very Javascript object-like!

Bonus points: Method that makes request from the other IDs available from the PubMed API.

Event Timeline

Mvolz created this task.Nov 10 2014, 8:48 AM
Mvolz raised the priority of this task from to Low.
Mvolz updated the task description. (Show Details)
Mvolz added a project: Citoid.
Mvolz changed Security from none to None.
Mvolz added a subscriber: Mvolz.
Mvolz moved this task from Backlog to IO Tasks on the Citoid board.Nov 10 2014, 8:56 AM

Hi,

I added support for PMID, PMCID, Manuscript ID and versioned identifier (they all use the same API) with request.

It's my first time using Gerrit, I hope I did it right! https://gerrit.wikimedia.org/r/#/c/176887/

(thank you legoktm on IRC for helping me with gerrit)

Thanks,
unicodesnowman

Change 176887 had a related patch set uploaded (by Unicodesnowman):
Add requestFromPMID (and aliases for PMCID, Manuscript ID), which fetches DOI and grabs response of that

https://gerrit.wikimedia.org/r/176887

Patch-For-Review

Change 176887 merged by Mvolz:
Add requestFromPubMedID, requestJSON

https://gerrit.wikimedia.org/r/176887

Mvolz closed this task as Resolved.Dec 2 2014, 12:25 PM