forked from thelinmichael/spotify-web-api-node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRY: Don't Repeat Yourself (thelinmichael#123)
* Moved the optional callback logic to "performRequest" * Refactored header and auth request bulding * Removed “addHeaders” and made repeatable calls to “withHeaders” possible * Made withAuth part of the request builder * Refactored legacy options/callback handler * Don't assign empty object * Refactored query parameters handling * Refactored body parameters handling * Allow multiple arguments to with[body|Query|Headers] builders * Made token part of WebApiRequest builder * A built request can now execute itself * Limit repetition in base-request with factories * Refactored getQueryParameterString and wrote tests for it
- Loading branch information
Showing
7 changed files
with
421 additions
and
1,304 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
Oops, something went wrong.