Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ddanninger/node-gracenote
Nodejs Gracenote.com Wrapper
https://github.com/ddanninger/node-gracenote
gracenote gracenote-api node-gracenote
Last synced: 8 days ago
JSON representation
Nodejs Gracenote.com Wrapper
- Host: GitHub
- URL: https://github.com/ddanninger/node-gracenote
- Owner: ddanninger
- Archived: true
- Created: 2014-07-02T15:19:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-04-15T13:49:55.000Z (over 5 years ago)
- Last Synced: 2024-09-20T02:37:58.354Z (about 2 months ago)
- Topics: gracenote, gracenote-api, node-gracenote
- Language: JavaScript
- Size: 15.6 KB
- Stars: 57
- Watchers: 4
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
node-gracenote
==============A node.js wrapper for the Gracenote API - https://developer.gracenote.com/web-api
## Installation
```
npm install 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](https://github.com/mikeal/request#requestdefaultsoptions).```
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_ONLY`or `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