Use this quick key switcher to pick the best key with the most remaining calls.
Great for those free API's with limited calls, but difficult to keep track of all the keys you may have generated.
Best if used on key generation to know the initialization value of maxCalls
Leverages local storage with a mask of your keys.
Simply populate the array of 'keys' with unique keys for the API call as a string, and the max number of calls and fetch your API.
Set an expiration time in hours of how often the calls reset.
For Instance:
1 day = 24 hours
1 month = 730 hours
Commments in the script on how to implement in program. The entire script is needed, where fetchAPI() represents your API call.
Browser's localStorage, ES6 and Javascript.