spotify / apps-tutorial

A Spotify App that contains working examples of the use of Spotify Apps API
https://developer.spotify.com/technologies/apps/
627 stars 146 forks source link

tutorials using `new Playlist()` #4

Closed jjgonecrypto closed 11 years ago

jjgonecrypto commented 12 years ago

some of the existing tutorials (such as play a list of songs, and play a song) use code like:

 var playerView = new views.Player();

from the API docs it seems that's deprecated to models.player instead. i tried the former to and had consistent crashes. can you update the tuts to the latest spec?

pompa commented 12 years ago

models and views are two different classes.

views generate standard UI "widgets" based on the model object.

where in the docs does it say it's deprecated?

jjgonecrypto commented 12 years ago

https://developer.spotify.com/technologies/apps/docs/beta/f19ff300f8.html

This constructor should not be used directly, but is included here for documentation purposes. Implements Observable.

which is the models one - hence my confusion. so the views one is meant to be embedded in the app?

pompa commented 12 years ago

Ah. No, so the model object is already created. you can invoke ~models.player.