-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public API #20
Comments
I could expose a public API, but it would only be for the name list. There is already an official Riot API for summoner names, the docs are here: This endpoint returns a An API for an individual summoner name could be simplified to the following, hopefully this helps: const fetchExpirationDate = async (name, token) => {
const res = await fetch(`https://na1.api.riotgames.com/lol/summoner/v4/summoners/by-name/${name}`, {
headers: {
'X-Riot-Token': token
}
});
const { revisionDate, summonerLevel } = await res.json();
const nameDecayInMonths = Math.min(30, Math.max(6, summonerLevel));
const expirationDate = new Date(revisionDate);
expirationDate.setMonth(expirationDate.getMonth() + nameDecayInMonths);
return expirationDate;
} |
Oh I wasn't aware their API was available so readily, I should have done a Google Search before requesting you to make your API public. I'll go ahead and do this. Thank you. EDIT: Oh, completely missed the development key is temporary for 24 hours and you still need to apply which I wasn't trying to deal with. Although I suppose I have no option but to wait to apply after Jan 3rd (they suspended apps). Also, personally I was more interested in using your endpoint for specific names, but having your name list would not be a bad idea. Side note, what are your thoughts on making a statics page using your data? For example, estimated owned accounts, estimated active accounts, etc. I know it's limited, but seeing as you have the data, would be interesting. |
A bit of a late response here, but I will be working on making a public API in the next month or so. The public API will have rate limits similar to that of Riots, so it will be pointless to use it for the sole purpose of bypassing Riot's rate limits. But, it may be useful in other legitimate use-cases. |
Would you be open to providing a public API? It would make it so much easier to keep track of accounts via Google Sheets and you also handle the caching if I'm not mistaken from a brief skim through the code.
The text was updated successfully, but these errors were encountered: