TooTallNate/node-spotify-web — pull request #56 by adammw (2013-12-03 05:22:38+00:00)
Title: Playlists (again)

Ok. I've completely forgotten what I was doing with this branch, and I'm trying to make sense of my spaghetti code. The original intention was to try and modularise some of the library and move out all the playlist logic into it's own separate object (and subsequently also do that also with the track, artist, album objects). Also, while doing all that, to implement #18 and #19 along with the other CRUD-style methods for playlists.

Let me stress that this PR is not ready to be merged - I'm looking for feedback.

@TooTallNate what do you think 1) about the idea in general of moving the playlist-related logic (and track, album, artist stuff) into separate objects (and hence files), and 2) about the API that node-spotify-web should provide for doing so. Currently, I think I'm using the object's constructor to access Playlists, but then I'm doing some freaky prototype dance to make sure that the data doesn't change while the user is trying to access it but somehow link them all together, which in hindsight sounds a lot like A Bad Idea (tm).

Can you think of a cleaner way of providing all this functionality?