Simple API to goear service.
Simple API to goear service. This is a humble attemp to create an easy to use API for consuming GoEar music info.
Install the module with:
npm install goear_api
var api = require'goear_api';apisearch"The Police - Bring on the night"console.log"Total songs available: " + datatotalCount;console.log"First title available: " + datatracks0title;;
There is only one methods in this API:
This method sends a request to the service in order to search for provided terms.
Provided callback is called when results are available.
Due to the nature of the provider, chances are that the request can't be completed in a reasonable amount of time (example: You search for 100 songs of Michael Jackson with a minimum quality of 320kbps). In that case, the api will return the songs it had time to get.
var api = require'goear_api';// Basic searchapisearch"Vetusta Morla"console.log"Total songs available: " + datatotalCount;console.log"Returned songs: " + datatrackslength: // Should be 10console.log"First title available: " + datatracks0title;;// Search for a song expecting 25 results with a quality equal or greater than 256kbsapisearch"The Police - Bring on the night"resultsCount: 25minQuality: 256console.log"First title available: " + datatracks0title;;
Copyright (c) 2012 PaquitoSoft
Licensed under the MIT license.