Unofficial packages provide easy ways to use the Riot API from Dart.
These packages aren't endorsed by Riot Games and don't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc.
- League of Legends api
- CHAMPION-MASTERY-V4
- CHAMPION-V3
- CLASH-V1
- LEAGUE-EXP-V4
- LEAGUE-V4
- LOL-CHALLENGES-V1
- LOL-RSO-MATCH-V1
- LOL-STATUS-V4
- MATCH-V5
- SPECTATOR-V5
- SUMMONER-V4
- TOURNAMENT-V5
- TOURNAMENT-STUB-V5
- Riot account api
- ACCOUNT-V1
- Valorant
- VAL-CONSOLE-MATCH-V1
- VAL-CONSOLE-RANKED-V1
- VAL-CONTENT-V1
- VAL-MATCH-V1 (Because of policy issue, not tested yet 😭.)
- VAL-RANKED-V1
- VAL-STATUS-V1
- Teamfight Tactics
- SPECTATOR-TFT-V5
- TFT-LEAGUE-V1
- TFT-MATCH-V1
- TFT-STATUS-V1
- TFT-SUMMONER-V1
- Legends of Runeterra (Not yet supported)
Here is what you need to use the Dart SDK:
- Dart 3.9.0 or higher
First, generate Riot API key.
Initialize RiotApi with your API key.
RiotApi.init(apiKey: 'your-api-key');Use APIname.queryFunction form to call query function.
You can check available api.
const puuid = 'your-puuid';
// Get account information by puuid.
final user = await AccountV1.getAccountByPuuid(PlatformValues.asia, puuid);
// Get account information by gameName and tagLine.
final user2 = await AccountV1.getAccountByRiotId(PlatformValues.asia, gameName, tagLine);const puuid = 'your-puuid';
// Get Summoner by PUUID.
final summoner = await SummonerV4.getSummonerByPuuid(RegionValues.kr, puuid);
// Get Match IDs by puuid
final matchIds = await MatchV5.getMatchIdsByPuuid(
PlatformValues.asia, puuid,
count: 1);
// Get Match information by match ID from query above.
final match =
await MatchV5.getMatchByMatchId(PlatformValues.asia, matchIds[0]);
// RSO endpoints use a player access token instead of the Riot API key.
final rsoMatchIds = await LolRsoMatchV1.getMatchIds(
PlatformValues.asia,
'Bearer player-access-token',
);
// Get a list of match ids by PUUID.
final match = await TFTMatchV1.getMatchListByPuuid(PlatformValues.asia, puuid, count: 1);
/// Get the challenger league.
final league = await TFTLeagueV1.getChallengerLeague(RegionValues.kr);
// Get a currently observed TFT game by PUUID.
final game = await TFTSpectatorV5.getCurrentGameInfoByPuuid(
RegionValues.kr,
puuid,
);
// // Get the top rated ladder.
final topLadder = await TFTLeagueV1.getTopRatedLadderByQueue(
RegionValues.kr,
'RANKED_TFT_TURBO',
);const actId = 'your-act-id';
// Get content optionally filtered by locale
final content = await ValContentV1.getContentByLocale(ValRegionValues.kr);
// Get platform status.
final status = await ValStatusV1.getPlatformStatus(ValRegionValues.kr);
// Get leaderboard
final board = await ValRankedV1.getLeaderboard(ValRegionValues.kr, actId, size: 100);
// Get a console match list.
final consoleMatches = await ValConsoleMatchV1.getMatchlistByPuuid(
ValRegionValues.ap,
puuid,
ValConsolePlatformType.playstation,
);Documentation comment will be added gradually 😀
