Skip to content
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

Open
Floby opened this issue May 30, 2013 · 6 comments
Open

Make user of this lib only deal with loaded objects? #15

Floby opened this issue May 30, 2013 · 6 comments
Labels

Comments

@Floby
Copy link
Owner

Floby commented May 30, 2013

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.

@19h
Copy link
Contributor

19h commented May 30, 2013

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?

@Floby
Copy link
Owner Author

Floby commented May 30, 2013

loaded object's method isReady return true.

On 30 May 2013 12:21, Kenan Sulayman [email protected] wrote:

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" objects?


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-18672201
.

@ls12styler
Copy link

I'm also having difficulty with what you mean by 'loaded objects'. Use case?

@Floby
Copy link
Owner Author

Floby commented Jun 20, 2013

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;
  }
})

@ls12styler
Copy link

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.

@LinusU
Copy link
Contributor

LinusU commented Sep 22, 2013

+1 this would be great! I must say that I really like the api used in https://github.com/TooTallNate/node-spotify-web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants