scotthovestadt / gigya

Gigya JavaScript REST SDK
MIT License
37 stars 62 forks source link

Api calls not supporting promises. #3

Closed singerxt closed 7 years ago

singerxt commented 8 years ago

Hey! Thanks for all your hard work on writing Gigya wrapper for node.js ! :-)

I think will be good to support promises for example

gigya.socialize.getToken(params)
  .then(loginUser)
  .catch(errorHandler)
scotthovestadt commented 8 years ago

Yeah, I agree. I'd actually like to refactor this as a breaking change to be promises-only.

For now, you can use bluebird promisify to automatically convert to promises.

scotthovestadt commented 7 years ago

@singerxt 6 months later - I just released a new version that supports promises. It also has support for TypeScript definitions! (If you haven't tried TS, I recommend it. A lot.)