Our engineers have been working hard on improving the platform and even though we haven’t mentioned much about any deployed changes, there have been a couple of additions lately that are worth mentioning. One big change is versioning of the Spotify Apps API by introducing a concept we call Frameworks.

Frameworks

Frameworks are simply bundles of scripts, resources and other assets that give you the tools to build your apps. The beauty of using Frameworks is that we can version the APIs and allow you as a developer to take part of new functionality when it appears, without being dependent of new client releases. This means that we can push new features and bug fixes much faster. We have two Frameworks available; api and resources.

  • api contain the necessary JavaScript classes you need to build the unique features we provide in Spotify.
  • resources contain image and CSS assets.

To start using the versioned Frameworks, you will have to do some changes to your manifest.json as well as how you include them in your code. In your manifest file, you add a new object called Dependencies:

"Dependencies": {
    "api": "0.1.0",
    "resources": "0.1.0"
}

Now the client will know which version of the Framework it should pull down. When you require our Frameworks, you should use our shortened way of referencing the Framework paths.

var sp = getSpotifyApi();
models = sp.require('$api/models');

For resources 0.1, you will still have to type the full path for the CSS include, as following: “sp://resources/css/eve.css”

Bundle Manager

With Spotify v. 0.8.3, we introduced a helper app to display more data of the apps loaded in the client. As a developer, you can easily see which apps are loaded in the client, as well as which Frameworks the app is dependent on. To access the Bundle Manager you simply go to the Develop menu and choose “Show Bundle Manager”. Stay tuned for more upcoming news regarding Spotify Apps API!