-
Notifications
You must be signed in to change notification settings - Fork 66
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
Make user of this lib only deal with loaded objects? #15
Comments
We're deploying this primarily for the performance of lookups using the C API compared to the other REST "wrapper" libraries. What exactly is your understanding of "loaded" / "ready" objects? |
loaded object's method On 30 May 2013 12:21, Kenan Sulayman [email protected] wrote:
|
I'm also having difficulty with what you mean by 'loaded objects'. Use case? |
I was thinking of moving all the API to an more classic async style like so sp.Track.getFromUrl('spotify:track:fdskjhluyqzeljh', function (err, track) {
if (!err) {
track.isReady() === true;
}
}) |
I think that's a good idea. It keeps the whole API inline with Node stuff in general. I'd rather (as a consumer of the module) work in this manner. |
+1 this would be great! I must say that I really like the api used in https://github.com/TooTallNate/node-spotify-web |
This is something I'd like to discuss with people actually using this lib.
I first tried to stick as closely as possible to the C API, just adding some javascript sugar and grouping namespaced C functions to objects.
But it seems to me that the Node Way would tell us to give users only ready objects.
Feel free to comment.
The text was updated successfully, but these errors were encountered: