New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scribble

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scribble

quick and sloppy Last.fm scrobbler and API library

0.0.5
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

#Scribble ###Simple Last.fm scrobbler for node.js

#####Scribble down the song

Build Status

###PreReqs

Get a last.fm API account and save the api key, api secret, and your username and password.

###Install npm install scribble

###Use it

var scribble = require('scribble');
// Build your scrobbler using your API keys and user info
var Scrobbler = new scribble('your_api_key','your_api_secret','your_lastfm_username','your_lastfm_password');
// Make a song object in your app
var song = {
  artist: 'Slayer',
  track: 'Disciple',
  album: 'God Hates Us All' // Only needed for album info call
};

/*
  POST methods
  All return the XML response from the POST requesta
*/
// Now Playing
Scrobbler.NowPlaying(song, function(post_return_data) {});
// Scrobble
Scrobbler.Scrobble(song, function(post_return_data) {});
// Love
Scrobbler.Love(song, function(post_return_data) {});

/*
  GET methods
  All return the parsed JSON response from Last.fm
*/
// Get Album
Scrobbler.GetAlbum(song, function(ret) {});
// Get Artist Info
Scrobbler.GetArtistInfo(song.artist, function(ret) {});
// Get Similar Artists
Scrobbler.GetSimilarArtists(song.artist, function(ret) {}, optional_return_amount_defaults_to_50);
// Get Artist Events
Scrobbler.GetArtistEvents(song.artist, function(ret) {}, optional_return_amount_defaults_to_50);
// Get Artist Top Albums
Scrobbler.GetTopAlbums(song.artist, function(ret) {}, optional_return_amount_defaults_to_50);
// Get Artist Top Tracks
Scrobbler.GetArtistTopTracks(song.artist, function(ret) {}, optional_return_amount_defaults_to_50);
// Get Similar Songs
Scrobbler.GetSimilarSongs(song, function(ret) {}, optional_return_amount_defaults_to_50);
// Get Track Info
Scrobbler.GetTrackInfo(song, function(ret) {});
// Get Album Info
Scrobbler.GetAlbumInfo(song, function(ret) {});

###Tests

npm install
make test
or
npm test

Keywords

lastfm

FAQs

Package last updated on 22 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts