nitrado / NitrAPI-PHP

PHP based SDK for the NitrAPI
https://server.nitrado.net/
MIT License
16 stars 11 forks source link

Respect rate limits #63

Closed f0086 closed 5 years ago

f0086 commented 5 years ago

The NitrAPI has a rate limit in place. This metadata will be stored in the header of each response. To access that, getters can be used. If a user reaches the rate limit, the NitrAPI refuses all requests. To handle that, a NitrapiRateLimitException will be thrown, so the client can handle that case properly.