Skip to content

Suggestion to improve Flickr.Upload #151

@ianengelbrecht

Description

@ianengelbrecht

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions