xinranxiao / meteor-spotify-web-api

A meteor package for Spotify's web API.
MIT License
34 stars 10 forks source link

eliminate need to specify empty {} in spotifyApi.* calls #12

Open MileanCo opened 7 years ago

MileanCo commented 7 years ago

Need to eliminate the need to specify the empty hash {} in spotifyApi calls like so: var response = spotifyApi.getUserPlaylists(userId, {});

It's not very intuitive to have to remember to specify nothing if you dont have any parameters. If you dont specify {}. the call never returns and the program hangs (no error).

It's also confusing that other methods like var response = spotifyApi.getMe( ); Dont require any extra empty hashes {} because the method actually doesnt take any parameters (and also fails if you try to specify any, or none with {} ).

Marking this mainly as a TODO

xinranxiao commented 7 years ago

hmm I'll look at this, but I'm guessing this depends heavily on how the underlying library does it. I can always just write a layer to shuffle the params around, however.