1.0.0 • Published 9 years ago

free-music-archive v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

Free Music Archive API

Basic wrapper around the free music archive api.

Usage

Main Endpoints

Main endpoints include the following methods:

  • recent
  • featured
  • tracks
  • albums
  • artists
  • genres

.. and are accessed like the following example:

var fma = require('free-music-archive');

fma.recent({limit: 2}, function(err, results) {
  if (err) console.error(err);
  console.log(JSON.stringify(results, null, 2));
})

Search

The search method is accessed a bit differently.

fma.search('woolen men', {limit: 10}, function(err, results) {
  if (err) console.error(err);
  console.log(JSON.stringify(results, null, 2));
})

You can also pass the query to the options object.

fma.search(null, {limit: 10, q: 'Annea Lockwood '}, function(err, results) {
  if (err) console.error(err);
  console.log(JSON.stringify(results, null, 2));
})