lastfm-history

1.0.0 • Public • Published

node-lastfm-history

Provides an EventEmitter interface to gaining Last.fm scrobble history.

Build Status

Installation

npm install lastfm-history

Example

var getHistory = require('lastfm-history');
var worker = getHistory('bencevans', 'API_KEY');
 
worker.on('page', function(tracks, meta) {
  console.log(tracks.length + ' scrobbles just pulled');
  console.log('meta:', meta);
  // store into database or file etc.
});
 
worker.on('complete', function() {
  console.log('complete');
  // start processing knowing you've got the whole dataset
});
 
worker.on('error', function(err) {
  console.log('err:', err);
});

/lastfm-history/

    Package Sidebar

    Install

    npm i lastfm-history

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • bencevans