Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 824 Bytes

README.md

File metadata and controls

46 lines (32 loc) · 824 Bytes

beagle-altmetrics

Usage

Callbacks:

var beagleAltmetrics = require("beagle-altmetrics")
var doi = "10.1371/journal.pone.0077056"

beagleAltmetrics.getDataFromDoi(doi, function(err, data) {
  if (err != null) {
    console.error(err)
    process.exit(-1)
  }

  // data is json
  console.log(data)
})

Streams:

var beagleAltmetrics = require("beagle-altmetrics")
var doi = "10.1371/journal.pone.0077056"

var stream = beagleAltmetrics.getDataFromDoiStream(doi)
// stream.pipe() into whatever
})

CLI

Examples of how to use the interface of this module:

Run them like:

./cli-stream.js "10.1371/journal.pone.0077056"
./cli-callback.js "10.1371/journal.pone.0077056"