GithubHelp home page GithubHelp logo

node-gracenote's Introduction

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(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

node-gracenote's People

Contributors

baoshan avatar ddanninger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.