ocilo / skype-http

Unofficial Skype API for Node.js via HTTP
https://ocilo.github.io/skype-http
MIT License
51 stars 24 forks source link

Refactor endpoint registration #59

Closed demurgos closed 6 years ago

demurgos commented 6 years ago

This commit moves the endpoint registration logic to its own file. The main changes are that the recursive logic for retries was replaced by an iteration. Each expected errors is thrown with a more detailed cause.

For example, for rate limit errors, an EndpointRegistrationError is thrown. It has a cause property with the name "LoginRateLimitExceeded" and a data property with the list of performed HTTP exchanges.

Closes ocilo/skype-http#55

You can take a look at it @James91, otherwise I'll merge it next week if there are no comments.

demurgos commented 6 years ago

@James91 You can use it by installing skype-http@next if you don't want to wait for the next stable release.