Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Refactor and API Redesign #70

Open
wants to merge 109 commits into
base: master
Choose a base branch
from

Conversation

adammw
Copy link
Collaborator

@adammw 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)

@miklschmidt
Copy link

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 25 commits April 18, 2014 10:36
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
No longer needed now we have Track#similar
This example script demonstrates how to listen for events on the
playlist instance.
…login_complete

Squashed commit of the following:

commit 0498c45
Author: Brandt Abbott <[email protected]>
Date:   Sat Apr 26 07:36:26 2014 -0600

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

commit 9268e2f
Author: Brandt Abbott <[email protected]>
Date:   Fri Apr 25 23:25:48 2014 -0600

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

Fixes TooTallNate#81.
Closes TooTallNate#82.

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

Successfully merging this pull request may close these issues.

4 participants