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

Added the ability to use the library with Promise or Async/Await syntax. #31

Closed
wants to merge 4 commits into from

Conversation

driverjb
Copy link
Contributor

@driverjb driverjb commented Sep 22, 2020

  • jsonApiCallAsync: Works just like jsonApiCall but instead of expecting a callback function a Promise object is returned. The promise will resolve when the 'stat' field is 'OK'. It will reject when the 'stat' field is not 'OK'. This makes for better use of Promise patterns like then().catch() and try/catch.
  • apiCallAsync: Works just like apiCall but returns a Promise following the same pattern as jsonApiCallAsync.

This does not touch the existing functionality. In fact it uses it. So these behave exactly the same as the original calls, but with the added convenience of being Promises. These changes will have no effect on those currently using the library (thus the minor version increment instead of major).

I also updated the travis CI configuration to reflect the currently supported NodeJS versions.

Reference: https://nodejs.org/en/about/releases/

PR (#30) is incorrect since NodeJS version 11 is not currently supported, and it does not include version 14 which is the latest build that will begin LTS on 10.27.2020.

@jpegram2
Copy link

Any updates on when this will be released?

@driverjb
Copy link
Contributor Author

I haven't heard from the project maintainer. For our production build, I just include their module and then expose the two functions I have provided in this MR as a local module. Annoying, but works.

@AaronAtDuo
Copy link
Contributor

Hi folks, sorry, we forgot to update this. We have some of our Node developers taking a look at this and we hope to act on it within the next week or so!

@driverjb
Copy link
Contributor Author

@AaronAtDuo Any word?

@janderson215
Copy link

Any update on this?

@driverjb
Copy link
Contributor Author

@AaronAtDuo It's been a little more than a few weeks. Any updates?

@driverjb
Copy link
Contributor Author

driverjb commented Aug 5, 2022

Any updates? I am considering working on this module again to bring in Typescript definitions because our team is in the process of upgrading our API with type support. Is this module still being monitored or should I start my own?

@driverjb
Copy link
Contributor Author

I have created my own module for anyone interested: https://www.npmjs.com/package/duo-admin-api.

@driverjb driverjb closed this Aug 11, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants