Spotify Apps API: any more documentation?

Asked
Active3 hr before
Viewed126 times

4 Answers

spotify
90%

At the moment the documentation is very sparse. I found it helpful to have a look at Spotify.app's resources inside the application bundle.,On a mac you can find some interesting sources in the app bundle at: Spotify.app/Contents/Resources/cef_views, Podcast 378: The paranoid style in application development ,Please be sure to answer the question. Provide details and share your research!

I just do a console.log on the "sp" object to trace out all objects that it contains. The sp objects has been named easily to undestand, so you can get a more indepth of the Spotify API. Example:

sp = getSpotifyApi(1);
toStringObject(sp);

function toStringObject(aObject, aTab) {
   if (aTab == undefined || aTab == null) {
      aTab = '';
   }
   for (var string in aObject) {
      console.log(aTab + 'object: ' + string + ', value: ' + aObject[string]);
      if (typeof(aObject[string]) == 'object') {
         toStringObject(aObject[string], aTab + '\t');
         console.log('-------------------------------------');
      }
   }
}
load more v
88%

A great way to see what is possible is to use the sample "api" app. Do that by typing "spotify:app:api" in the search box, and using the inspector to see what code is being included.,I just do a console.log on the "sp" object to trace out all objects that it contains. The sp objects has been named easily to undestand, so you can get a more indepth of the Spotify API. Example:,At the moment the documentation is very sparse. I found it helpful to have a look at Spotify.app's resources inside the application bundle.,As others have said, it WAS possible to browse the source and view a sample "API" application, but neither of these are available anymore. For this reason, I have put together a kitchen sink application, which demonstrates how to perform much of the basic functionality. It may come in handy to anyone getting started:

I just do a console.log on the "sp" object to trace out all objects that it contains. The sp objects has been named easily to undestand, so you can get a more indepth of the Spotify API. Example:

sp = getSpotifyApi(1);
toStringObject(sp);

function toStringObject(aObject, aTab) {
   if (aTab == undefined || aTab == null) {
      aTab = '';
   }
   for (var string in aObject) {
      console.log(aTab + 'object: ' + string + ', value: ' + aObject[string]);
      if (typeof(aObject[string]) == 'object') {
         toStringObject(aObject[string], aTab + '	');
         console.log('-------------------------------------');
      }
   }
}
load more v
72%

Information about the album like its available markets, its copyright holder, Universal Product Code, popularity on Spotify, release date, and genre.,You can make similar calls through the Web API to retrieve information from the Spotify catalog about artists, tracks and playlists. There is a huge amount of data available, and the best part is that it’s free to access.,Also at the site you will find a fully-featured Web API Console where you can interactively test all the Web API endpoints.,These documents are worth reading carefully if you are planning to create a program and make it available to others. We understand that these two documents can seem a little overwhelming but please understand that in many cases Spotify licenses its content from other rights holders and we are bound by the conditions in those licenses.

Unlike our previous search example which we ran straight from our browser (and which, behind the scenes, used an HTTP GET request to do its business), a typical OAuth-based call to the Web API is a little more complex. We can show how such a call looks by showing it as a cURL command (cURL is a popular command-line tool for transferring data to and from a server):

curl - X POST "https://api.spotify.com/v1/users/chris/playlists" - H "Accept: application/json" - H "Authorization: Bearer QB0zg...eF9U" -
   H "Content-Type: application/json"--data "{\"name\":\"NewPlaylist\",\"public\":true}"
65%

Frequently Asked Questions,Playback is always in sync with Spotify app,How Do App Remote Calls Work?,Playback, networking, and caching is all accounted for by the Spotify app

Add XCFramework
load more v

Other "spotify-undefined" queries related to "Spotify Apps API: any more documentation?"