A library to facilitate access to the Riot API.

Build codecov

Usage

import 'package:league_of_api/api/consts/region_routing_values.dart';
import 'package:league_of_api/api/models/riot_id.dart';
import 'package:league_of_api/api/models/tag_line.dart';
import 'package:league_of_api/league_of_api.dart';

void main() async {
  final leagueApi = LeagueOfApi('your_api_key');
  var account = await leagueApi.accountV1Service.getAccountByRiotId(
    RegionRoutingValue.AMERICAS,
    RiotId('Driky', TagLine('5441')),
  );
  print(account);
}

Riot API key

Get your key here

Contribution

I appreciate any contributions to this package. Any not yet implemented endpoints can be added similarly to the other implementations. Feel free to reach out to me to ask any questions.

Model code generation

The DTOs fromJson and toJson methods are generated with json_serializable.

Every time a model class annotated with @JsonSerializable is modified, you need to run the following command:

pub run build_runner build --delete-conflicting-outputs

Note: You can remove the --delete-conflicting-outputs if you are the last person who ran this command (faster execution by using a local cache)

Note 2: The plugin AutoJson for Android Studio/IntelliJ provides a handy shortcut for that command.

Libraries

account_dto
account_v1_service
active_shard_dto
apex_ranks
base_service
divisions
error_status_codes
games
league_entry_dto
league_item_dto
league_list_dto
league_of_api
Support for doing something awesome. [...]
league_v4_service
mini_series_dto
platform_routing_values
queue
region_routing_values
riot_id
summoner_dto
summoner_v4_service
tag_line
tag_line_converter
tiers