Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

javascript musiXmatch API library for nodejs

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
README.md

musiXmatch API library for NodeJS

Installation

npm install -g musixmatch

Examples

var util  = require("util");
var mXm   = require("musixmatch");

mXm.Config.API_KEY = "YOUR_API_KEY";

var successCallback = function(modelOrCollection) {
  console.log("Success:");
  console.log("  " + util.inspect(modelOrCollection));
};

var errorCallback = function(response) {
  console.log("Error callback:");
  console.log("  " + util.inspect(response));
};

mXm.API.getTrack(TRACK_ID, successCallback, errorCallback);
mXm.API.getLyrics(LYRICS_ID, successCallback, errorCallback);
mXm.API.getArtist(ARTIST_ID, successCallback, errorCallback);
mXm.API.getAlbum(ALBUM_ID, successCallback, errorCallback);
mXm.API.getSubtitle(TRACK_ID, successCallback, errorCallback);
mXm.API.searchTrack({q: QUERY}, successCallback);
Something went wrong with that request. Please try again.