colorfulstan / leaguejs Goto Github PK
View Code? Open in Web Editor NEWA Javascript Wrapper for the League of Legends API
License: MIT License
A Javascript Wrapper for the League of Legends API
License: MIT License
/lol/league/v3/mmr-af/by-summoner/{summonerId}
https://discussion.developer.riotgames.com/questions/5140/spring-update.html
Hi there,
Is there any solution or an example on how to bypass CORS issues with this package?
I'm developing a personal site where I would like to display riot stats within a page. I'm using NextJS for the frontend and Strapi for the backend.
For most StaticData pseudo "Endpoints" the whole Datadragon file is returned.
This might include a lot of unneeded data and has to be filtered out by the consumer of this library.
Restoring the StaticData Endpoint behaviour, to respect the tags option (and dataById where needed) would be great.
Hello, I am using Cordova and after looking for two days and before asking in some Cordova forum I wanted to know if it´s possible to use LeagueJS in this kind of technology. I installed it (so it is in node_modules) but I can´t find the module in the JS using require() (cordova.require() in my case).
Thank you.
Endpoint will be removed on January 10th
Since the breaking change is not imposed by the library and since the endpoint will stop working within the old versions anyways, versioning will propably stay on 1.x
For now, DataDragon files are stored on the filesystem without expiration (since they don't change).
In-memory caching is used for
I assume for the use cases this library is used for this should be fast enough, I might tinker with it at some point, but for now this is good enough for me.
Suggestions / Pull requests always welcome of course.
After running a few requests (about 10 to 20) on the static-data endpoint, the endpoint (and just the one) stops working completely. Specifically I've used StaticData.gettingChampions(); and StaticData.gettingChampionById(). While they are disabled, all other endpoints still work as expected.
Match-V4 support is being deprecated on September 13, 2021.
Match-V5 is now available for production keys.
For this library to stay relevant it will need Match-V5 support.
Match.gettingListByAccount returns 20 items when it should be returning 'endIndex' number of matches.
When RIOT fixed 'totalGames' in the MatchListDto, we should make 1 request in series, to figure out how many pages there are, and then request the remaining pages in parallel
Seems like some constants were removed.
GameMode + QueuId should be used in the future
moved from claudiowilson/LeagueJS#78
FYI: The Nexus Blitz alpha will be played on queueId 1200, mapId 21, and gameMode GAMEMODEX
https://na.leagueoflegends.com/en/news/game-updates/features/play-nexus-blitz-alpha
New Free rotation endpoint live now, deprecation of /platform/champions + /platform/champions/by-id on October 15th
https://discussion.developer.riotgames.com/articles/6035/free-champion-rotation-endpoint.html
https://discussion.developer.riotgames.com/articles/5719/removal-of-the-lol-static-data-v3-api.html
August 27th Static Data endpoints will be removed.
I'm in the process of adding DataDragon support, but not sure if I will get to rewire all the methods in time.
Simply delivering the DataDragon files through the endpoint methods would be a good first step to prevent a breaking change, but adding the options back in might be a pain, and possibly not worth the effort.
Open for discussion and contribution, will update here when the DataDragon integration is live.
I'm writing a basic tool to grab a list of matches from the past 24 hours and just console.log them right now. I'm successfully getting the matchlist with the encrypted summoner ID. Then, I'm getting the detailed data by getting with the matchID. I'm trying to do this for the entire matchlist but it only works for the first one in the matchlist. Running through a debugger, it appears that the code just mysteriously (and without an error) crashes at MatchEndpoint.js:48
.
I'm sure that getting a summoner's list of matches and the details about them is a fairly solved challenge so I'm guessing this issue doesn't actually require a fix. That said, it seems like something wonky is going on with my use of your library - not my use of Promises and async/await more broadly.
My project is will be open so I have the luxury of sharing my code with you:
const league = new (require('leaguejs'))(process.env.LEAGUE_KEY);
const { season, queue } = require('./constants');
exports.getSummonerDataSince = async beginTime => {
const matchList = (await league.Match.gettingListByAccount(
process.env.LEAGUE_ACCOUNT_ID,
process.env.LEAGUE_API_PLATFORM_ID,
{ beginTime },
)).matches;
const data = [];
for (let match of matchList) data.push(await getGameData(match.gameId));
return data;
};
const getGameData = async matchId => {
console.log('start fetch');
const fullData = await league.Match.gettingById(matchId);
console.log('data fetched');
return {
season: season(fullData.seasonId),
queue: queue(fullData.queueId),
duration: fullData.gameDuration,
};
};
// this code only printed out "start fetch", "data fetched", "start fetch"
for Example /match/v3/matches might require different TTL then /match/v3/matchlists.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.