Nagging Mario's Princess

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);
});

Keywords

none

install

npm i lastfm-history

Downloadsweekly downloads

11

version

1.0.0

license

none

last publish

collaborators

  • avatar
Report a vulnerability