Node wrapper for the PLOS ALM API
var Alm = ;var alm = '10.1371/journal.pbio.1000242';alm;alm;
npm install nodealm
Summary level information - Example response
// DOI 10.1371/journal.pone.0036240result =doi: '10.1371/journal.pone.0036240'title: 'How Academic Biologists and Physicists View Science Outreach'url: ''mendeley: '88bfe7f0-9cb4-11e1-ac31-0024e8453de6' // Mendeley article idpmid: '22590526' // PubMed idpmcid: '3348938' // PubMed Central idpublication_date: '2012-05-09T07:00:00Z'update_date: '2014-01-11T14:20:30Z'views: 12987shares: 276bookmarks: 38citations: 3...
More detailed source information - Example response
The response also returns an array of ALM data sources with more detailed information.
// DOI 10.1371/journal.pone.0036240result =...sources:twitter:name: 'twitter'display_name: 'Twitter'events_url: nullmetrics:pdf: nullhtml: nullshares: nullgroups: nullcomments: 136likes: nullcitations: nulltotal: 136...
Multiple articles can be requested by providing and array of DOIs
var alm = '10.1371/journal.pbio.1000242' '10.1371/journal.pone.0035869';
Additional options are provided through the options object
var options =info: 'history'days: 30;alm;
Controls the amount of detail provided in the response
|summary||Only article metadata (DOI, title, PubMed IDs) and summary metrics|
|detail||All historical data and all raw data sent by the source|
|event||All raw data provided by the source|
|history||All historical data, includes metrics by day, month and year|
Filter the list of sources returned in response. A list of sources is available here.
Shows metrics after a given time in days of publication. So, for example, if set to 30, the metrics in the response will be calculated at the time 30 days after the article was published.
Similar to the
days option, but calculates using months instead of days.
Similar to the
months options but calculates the metrics at the end of the given year. For example, if set to 2012 the metrics will be calculated up to the end of 2012.
Command line usage
(Please note, this feature isn't well fleshed out yet). To use with the command line, use the command
node cli.js DOI_HERE
To request multiple DOIs, provide a comma-separated list of DOIs.
Tests are provided with
mocha. Run the tests with
(Please note that some tests will hit the API, and so will take longer to complete. This may change if/when I start mocking the API.)
(The MIT License)
Copyright © 2014 Alasdair Smith
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.