[WIP] Refactor and API Redesign #70

Open
wants to merge 109 commits into
from

Conversation

Projects
None yet
4 participants
@adammw
Collaborator

adammw commented Feb 14, 2014

🚧

Ref: #56

Loosely based off this design proposal.

⚠️ Expect breaking changes ⚠️

📝 comments welcome 📝

Classes

  • SpotifyUri
  • Connection
  •   Request
  •   Response
  •   HermesRequest
  •   HermesResponse
  • Metadata
  •   Album
  •   Artists
  •   Tracks
  •   PlaySession
  • Playlists
  •   Playlist
  •   PlaylistAttributes
  •   PlaylistChange
  •   PlaylistContents
  •   PlaylistItem
  •   PlaylistRevision
  • Radio
  • Users

TODOs / Wishlist

  • Move connection-related code to Connection class
  • Move request-related code to Request/HermesRequest/Response/HermesResponse class
  • Pluggable command handling API would be nice, otherwise eventemitter is fine, just have to not warn about unhandled events. (think think)
  • Request Queueing and auto-reconnection on disconnection (handle the 'disconnect' command)
  • Automatic subscribe / unsubscribe on Playlist events
  • Support playlist events
  • Make playlist class work with rootlists
  • Playlist add/move/delete methods
  • Remove old code from spotify.js
  • Support caching of Hermes calls
  • Work out how to share state between objects (e.g. two playlist instances for the same url shouldn't have to make two calls, two subscriptions, etc. - although subscriptions should have code to stop this being a real problem)
  • jslint / jshint
  • Backwards compatibility stubs
  • Remove debugging logspew
  • Test everything manually
  • Docs
  • Automated testing (e.g. Travis CI - would be nice, but is probably asking too much)

adammw added some commits Feb 14, 2014

@Techwraith

This comment has been minimized.

Show comment Hide comment
@Techwraith

Techwraith Feb 25, 2014

This looks amazing! I want!

This looks amazing! I want!

@TooTallNate TooTallNate referenced this pull request Feb 27, 2014

Closed

Some features/questions #71

@adammw adammw referenced this pull request Feb 27, 2014

Closed

Playlists (again) #56

@miklschmidt

This comment has been minimized.

Show comment Hide comment
@miklschmidt

miklschmidt Apr 1, 2014

I really hope you have time to finish this, i started using it because of the User prototype, and it works really well. I did run into the 403 forbidden issue while playing tracks though. Dno if it would've happened using master. Need to do some more testing.

Update: Looks like just hitting track.play() again after a 403 works fine.

I really hope you have time to finish this, i started using it because of the User prototype, and it works really well. I did run into the 403 forbidden issue while playing tracks though. Dno if it would've happened using master. Need to do some more testing.

Update: Looks like just hitting track.play() again after a 403 works fine.

JChapman202 and others added some commits Apr 2, 2014

Added Spotify.Web.App.initialize() noop Function
Recently Spotify Web started calling the initialize() function in the
authentication script which causes an exception to be thrown while
connecting node-spotify-web.  This NOOP operation allows authentication
to complete successfully.

Conflicts:
	lib/spotify.js
Remove Spotify#similar
No longer needed now we have Track#similar
example: add playlistEvents
This example script demonstrates how to listen for events on the
playlist instance.
spotify: new flash key, moved sp_log and sp_user_info commands after …
…login_complete

Squashed commit of the following:

commit 0498c45
Author: Brandt Abbott <brandt.abbott@readytalk.com>
Date:   Sat Apr 26 07:36:26 2014 -0600

    Issue #81 forgot to remove calls from _onconnect, it was late at night

commit 9268e2f
Author: Brandt Abbott <brandt.abbott@readytalk.com>
Date:   Fri Apr 25 23:25:48 2014 -0600

    Issue #81 - New flash key.  Moved sp_log and sp_user_info commands after login_complete

Fixes #81.
Closes #82.

Conflicts:
	lib/spotify.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment