groupme-js / node-groupme

The only GroupMe API library for NodeJS that isn't a million years old.
https://groupme.js.org
MIT License
27 stars 11 forks source link

Asynchronous client construction #3

Open not-so-smart opened 3 years ago

not-so-smart commented 3 years ago

Some properties on the Client object (Client.user) rely on asynchronous operations (fetching /users/me).

Perhaps making the constructor private and providing an async function that returns a new Client object would be a better idea?

This way, all properties on the Client object can be definitely assigned in the constructor. (no more unnecessary ? types)