tidal-api-wrapper
An unofficial API wrapper for Tidal Music. Tidal does not provide a documented public API so all endpoints have been found using Chrome Dev Network Tools. All methods return promises and are "thenable" (with the exception of artistPicToUrl and albumArtToUrl).
Note
Since this is an unofficial wrapper and the Tidal API is not public this wrapper could break at any time. Automated tests are performed daily on Travis and if any endpoints have changed or are not working the build will be marked as failing.
Usage
Import tidal-api-wrapper and instantiate it.
var Tidal = ; var tidal = ;
Documentation
Examples
Using ES2015
;// options object as an argument is optional// if omitted Tidal will default to these valuesconst tidal = countryCode: 'US' limit: 1000; // search for an artist and then get their albumstidal ; // get all artist albums and then tracks for each album tidal ; // login and get favorite artists tidal ;
Using ES7 async/await
;// options object as an argument is optional// if omitted Tidal will default to these valuesconst tidal = countryCode: 'US' limit: 1000; // search for an artist and then get their albums { try const artists = await tidal; const artist = artists0; const albums = await tidal; console; return albums; catch e console; }; // get all artist albums and then tracks for each album { try const albums = await tidal; const promises = albums; const tracks = await Promiseallpromises; console; return tracks; catch e console; }; // login and get favorite artists { try const auth = await tidal; const myFavoriteArtists = tidal; console; catch e console; };