forked from TooTallNate/node-spotify-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spotify: refactor MercuryRequest code into sendProtobufRequest function
Previously, all functions which required MecuryRequest for communications (such as `metadata()`, `playlist()` and `rootlist()) ) had to do the construction of requests and callback processing themselves. This commit refactors the logic into a separate `sendProtobufRequest()` function which handles these sorts of communication. This commit also updates the MercuryRequest protobuf format with new fields and field names as found in the official client, and it turns out that the reply of a MercuryRequest is actually MercuryRequest protobuf and not a MercuryReply as was it being parsed as previously, so it is used instead for parsing replies. Fixes TooTallNate#11
- Loading branch information
Showing
3 changed files
with
175 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters