Nodejs Gracenote.com Wrapper
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib Node.js Compatible Dec 23, 2015
README.md Update README.md Jun 24, 2018
package.json * added description for version 0.0.2 Aug 2, 2015

README.md

node-gracenote

A node.js wrapper for the Gracenote API - https://developer.gracenote.com

Installation

npm install ddanninger/node-gracenote

Gracenote Options

Request defaults can be sent as an extra parameter to the constructor. More information can be found at the Request Github page.

var api = new Gracenote(clientId,clientTag,userId,requestDefaults);

Register

Function - api.register(req callback)

var Gracenote = require("node-gracenote");
var clientId = "XXX";
var clientTag = "YYY";
var userId = null;
var api = new Gracenote(clientId,clientTag,userId);
api.register(function(err, uid) {
	// store this somewhere for the next session
})`;

Search For Track

Function - api.searchTrack(req artistName, req albumTitle, req trackTitle, req callback, opt matchMode)

var Gracenote = require("node-gracenote");
var clientId = "XXX";
var clientTag = "YYY";
var userId = "ZZZ";
var api = new Gracenote(clientId,clientTag,userId);
api.searchTrack("Kings of Leon", "Only by the Night", "Sex on fire", function(err, result) {
	// Search Result as array
});

Search for Artist

Function - api.searchArtist(req artistName, req callback, opt matchMode)

var Gracenote = require("node-gracenote");
var clientId = "XXX";
var clientTag = "YYY";
var userId = "ZZZ";
var api = new Gracenote(clientId,clientTag,userId);
api.searchArtist("Kings of Leon", function(err, result) {
	// Search Result as array
});

Search for Album

Function - api.searchAlbum(req artistName, req albumTitle, req callback, opt matchMode)

var Gracenote = require("node-gracenote");
var clientId = "XXX";
var clientTag = "YYY";
var userId = "ZZZ";
var api = new Gracenote(clientId,clientTag,userId);
api.searchAlbum("Kings of Leon", "Only by the Night", function(err, result) {
	// Search Result as array
});

Config options

matchMode- can be either Gracenote.BEST_MATCH_ONLYor Gracenote.ALL_RESULTS(default)

setExtended(str) - let you change the extended data from gracenote - default : COVER,REVIEW,ARTIST_BIOGRAPHY,ARTIST_IMAGE,ARTIST_OET,MOOD,TEMPO setCoverSize(str) - let you change the cover size - default: MEDIUM setLanguage(iso) - pass a language parameter - default: null