dolejska-daniel / riot-api

Riot League of Legends & DataDragon API wrappers for PHP7 and PHP8.
GNU General Public License v3.0
112 stars 25 forks source link

curious about Rate LIMIT. #29

Closed merons closed 5 years ago

merons commented 5 years ago

Currently, we are making good use of this api. However, I want to use multiple API keys because of limitations of API use. So I checked the cache in the cache folder and it seems that each key has its own cache. If I try to use multiple API keys, will LIMIT work well with each change in key value?

dolejska-daniel commented 5 years ago

Hello and thank you for your interest in this library!

Rate limiting control is built to work with multiple API keys by default. There will be no problem using it this way. You can also change the API key during lifetime of the library just by using $api->setSetting(RiotAPI::SET_API_KEY, THE_KEY);, if you'd need that.