-
Notifications
You must be signed in to change notification settings - Fork 45
getPlaylists callback argument is not a RESTCallback #146
Comments
yes, because its stored in a buffer object that doesn't result in an error. Its not the only function that isnt in the (err, data) => {} format. getHistory These all don't use API methods to send a REST request and are documented to have the standard function callback style. All of them are cached in their respective locations in plugAPI itself. |
I kind of like it when APIs are consistent, would you be opposed to change them? |
Changing them would break any user's code that uses callbacks unfortunately. I can't just change it to return callback(null, data); |
Returning a promise shouldn't break anyone, I think? |
Changing to promises requires a large discussion on the direction of plugapi |
Regarding the discussion on promise usage, that will be moved to #144. For those that are just pure setters / getters with no interaction with the REST API, those only return callback(data) or data. |
The callback argument for getPlaylists is of the form
(data) => {}
, not(err, data) => {}
as is the norm for other methods in the API.The text was updated successfully, but these errors were encountered: