0.3.2 • Published 6 years ago

musicmatch v0.3.2

Weekly downloads
94
License
MIT
Repository
github
Last release
6 years ago

musicmatch

download-count dev-deps

NodeJS musicmatch api

Install

$ npm install musicmatch

Usage

music = require('musicmatch')({apikey:""});

// or

music =  require('musicmatch')();

Methods

NameMethod
chart.artists.getchartArtists
chart.tracks.getchartTracks
track.searchtrackSearch
track.gettrack
track.subtitle.gettrackSubtitle
track.lyrics.gettrackLyrics
track.snippet.gettrackSnippet
track.lyrics.posttrackLyricsAdd
track.lyrics.feedback.posttrackLyricsFeedback
matcher.lyrics.getmatcherLyrics
matcher.track.getmatcherTrack
matcher.subtitle.getmatcherSubtitle
artist.getartist
artist.search.getartistSearch
artist.albums.getartistAlbums
artist.related.getartistRelated
album.getalbum
album.tracks.getalbumTracks

chartArtists

ParamsDesc
countryA valid country code (default US)
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.

Example

music.chartArtists({page:1, page_size:3, country:"tr"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

chartTracks

ParamsDesc
countryA valid country code (default US)
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.
f_has_lyricsWhen set, filter only contents with lyrics

Example

music.chartTracks({page:1, page_size:3, country:"tr", f_has_lyrics:1})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackSearch

ParamsDesc
qSearch within track titles,artists,lyrics
q_lyricsAny word in the lyrics
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.
f_has_lyricsWhen set, filter only contents with lyrics
f_artist_idWhen set, filter by this artist id
f_music_genre_idWhen set, filter by this music category id
f_artist_mbidWhen set, filter by this artist musicbrainz id
f_lyrics_languageFilter by the lyrics language (en,it,..)
s_track_ratingSort by our popularity index for tracks (asc-desc)
s_artist_ratingSort by our popularity index for artists (asc-desc)
quorum_factorSearch only a part of the given query string.Allowed range is (0.1 – 0.9), default is 1 (100%)

Example

music.trackSearch({q:"Chet Faker - Gold", page:1, page_size:3})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

track

ParamsDesc
track_idThe musiXmatch track id
track_mbidThe musicbrainz recording id

Example

music.track({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackSubtitle

ParamsDesc
track_idThe musiXmatch track id
track_mbidThe musicbrainz recording id
subtitle_formatThe format of the subtitle (lrc,dfxp,stledu). Default to lrc
f_subtitle_lengthThe desired length of the subtitle (seconds)
f_subtitle_length_max_deviationThe maximum deviation allowed from the f_subtitle_length (seconds)

Example

music.trackSubtitle({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackLyrics

ParamsDesc
track_idThe musiXmatch track id
track_mbidThe musicbrainz recording id

Example

music.trackLyrics({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackSnippet

ParamsDesc
track_idThe musiXmatch track id

Example

music.trackSnippet({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackLyricsAdd

ParamsDesc
track_idThe musiXmatch track id
lyrics_bodyThe lyrics

Example

music.trackLyricsAdd({track_id:15445219, lyrics_body:"example lyrics"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackLyricsFeedback

ParamsDesc
lyrics_idThe musiXmatch lyrics id
track_idThe musiXmatch track id
feedbackThe feedback to be reported, possible values are: wrong_lyrics, wrong_attribution, bad_characters, lines_too_long, wrong_verses, wrong_formatting

Example

music.trackLyricsFeedback({track_id:15445219, lyrics_id:4193713, feedback:"wrong_verses"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

matcherLyrics

ParamsDesc
q_trackThe song title
q_artistThe song artist

Example

music.matcherLyrics({q_track:"sexy and i know it", q_artist:"lmfao"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

matcherTrack

ParamsDesc
q_trackThe song title
q_artistThe song artist
q_albumThe song album
f_has_lyricsWhen set, filter only contents with lyrics
f_has_subtitle

Example

music.matcherTrack({q_artist:"eminem", q_track:"lose yourself"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

matcherSubtitle

ParamsDesc
q_trackThe song title
q_artistThe song artist
f_subtitle_lengthFilter by subtitle length in seconds
f_subtitle_length_max_deviationMax deviation for a subtitle length in seconds

Example

music.matcherSubtitle({q_track:"sexy and i know it", q_artist:"lmfao", f_subtitle_length:200})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artist

ParamsDesc
artist_idThe musiXmatch artist id
artist_mbidThe musicbrainz artist id

Example

music.artist({artist_id:118})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artistSearch

ParamsDesc
q_artistThe song artist
f_artist_idWhen set, filter by this artist id
f_artist_mbidWhen set, filter by this artist musicbrainz id
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.

Example

music.artistSearch({q_artist:"prodigy", page_size:5})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artistAlbums

ParamsDesc
artist_idThe musiXmatch artist id
artist_mbidThe musicbrainz artist id
g_album_nameGroup by Album Name
s_release_dateSort by release date (asc-desc)
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.

Example

music.artistAlbums({artist_id:1039, s_release_date:"desc", g_album_name:1})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artistRelated

ParamsDesc
artist_idThe musiXmatch artist id
artist_mbidThe musicbrainz artist id
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.

Example

music.artistRelated({artist_id:56, page_size:2, page:1})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

album

ParamsDesc
album_idThe musiXmatch album id

Example

music.album({album_id:14250417})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

albumTracks

ParamsDesc
album_idThe musiXmatch album id
album_mbidThe musicbrainz album id
formatDecide the output type (json or xml)
f_has_lyricsWhen set, filter only contents with lyrics
pageDefine the page number for paginated results
page_sizeDefine the page size for paginated results. Range is 1 to 100.

Example

music.albumTracks({album_id:13750844, page:1, page_size:2})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})
0.3.2

6 years ago

0.3.2-beta.3

6 years ago

0.3.2-beta.2

6 years ago

0.3.2-beta.1

6 years ago

0.3.2-beta.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.6

6 years ago

0.2.5

8 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.4

9 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago