Bootstrapping under Spotify iOS SDK — basic questi

2019-08-31 07:00发布

问题:

Firstly, nice job to the Spotify iOS SDK team -- it's come a long way and it's not easy to make an async world for the sync-minded masses! :)

We have a basic query usage question that's probably answered elsewhere, but it'd be helpful to have a dev be clear on the issue (plus, there may be some new query paradigms in the new iOS SDK that could be used). Basically, our app embeds the Spotify iOS SDK, offering the ability for the user to choose high-level audio sources: "Stations" and the entries under "Your Music" ("Playlists", "Songs", "Albums", and "Artists").

So, it'd be infinitely helpful if a dev could outline which queries would be made from the iOS SDK level (and which subsequent queries would be made for the items above). If it turns out that doing initial/root-level queries is best done via the web API, could a dev please outline the official/approved method for forming a URL query?

Also, is there's a whitepaper or formal Spotify doc that formalizes Spotify URIs?

Thanks! Drew SoundSpectrum

回答1:

In the iOS SDK, everything you need is in the SPTRequest object.

  • playlistsForUserInSession:callback: gives you playlists.

  • savedTracksForUserInSession:callback: gives you the user's saved songs.

To get the user's "Albums" and "Artists" lists, you derive this yourself from the list of saved songs - there's no API to fetch them separately.

Radio stations aren't available in our SDKs.