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

Suggestion to improve Flickr.Upload #151

Open
ianengelbrecht opened this issue Sep 4, 2022 · 0 comments
Open

Suggestion to improve Flickr.Upload #151

ianengelbrecht opened this issue Sep 4, 2022 · 0 comments

Comments

@ianengelbrecht
Copy link

Hi guys,

I think the sdk could be improved as follows:

If we already have:

var flickr = new Flickr(Flickr.OAuth.createPlugin(
  process.env.FLICKR_CONSUMER_KEY,
  process.env.FLICKR_CONSUMER_SECRET,
  process.env.FLICKR_OAUTH_TOKEN,
  process.env.FLICKR_OAUTH_TOKEN_SECRET
));

... then why not just await flickr.upload(file, [args]) rather than having to call a constructor again?

It feels like this would be more intuitive. I've got a module where I create flickr and then I import it wherever I need it. But currently for upload, I have to create the auth function again, call a constructor, and await the resulting promise.

Great library though, I got up and running with the API very quickly.

Cheers,

Ian

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

No branches or pull requests

1 participant