athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

Outdated API docs and Typescript definitions #9

Closed ismarslomic closed 2 years ago

ismarslomic commented 5 years ago

Is it only me or are the Typescript Classes found in the NPM package athom-api and the documentation of those found at developer portal out of sync with the actual implementation/api responses?

For instance AthomCloudApi.getAuthenticatedUser() returns AthomCloudApi.User, but neither docs nor Typescript Class for this Object includes the property fullname. However the actual response object does. I have installed v2.1.194 although I see that version 3.0.2 also exists (but found same inconsistency in this version as well). And by the way, the link to the Gihub repo https://github.com/athombv/node-homey-api is broken, seems like this repo has been made private or been moved.

Found also another confusing inconsistency in the Typescript definitions: none of the AthomCloudAPI methods seems to be returning Promise, but Introduction doc https://developer.athom.com/docs/api/tutorial-Introduction.html uses await and it seems from the index.js that Promises are returned. Maybe Typescript definitions are not maintained anymore?

ismarslomic commented 5 years ago

This is actually big issue in a project where I use Typescript, is it possible to update Typescript definitions soon?

thuijer commented 4 years ago

No, it's not only you. The TypeScript definitions are quite outdated/inconsistent/wrong. @WeeJeWel, how can we help to improve them?

mackelito commented 4 years ago

Any updates on this?

WeeJeWel commented 3 years ago

We're working on a new API client — no ETA yet but the new one will be TypeScript complete.

WeeJeWel commented 2 years ago

This is fixed with homey-api.