A library to facilitate access to the Riot API.
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
- api/account_v1/models/account_dto
- api/account_v1/account_v1_service
- api/account_v1/models/active_shard_dto
- api/consts/apex_ranks
- api/base_service
- api/consts/divisions
- api/consts/error_status_codes
- api/consts/games
- api/league_v4/models/league_entry_dto
- api/league_v4/models/league_item_dto
- api/league_v4/models/league_list_dto
- league_of_api
- Support for doing something awesome.
- api/league_v4/league_v4_service
- api/league_v4/models/mini_series_dto
- api/consts/platform_routing_values
- api/consts/queue
- api/consts/region_routing_values
- api/models/riot_id
- api/summoner_v4/models/summoner_dto
- api/summoner_v4/summoner_v4_service
- api/models/tag_line
- api/account_v1/models/tag_line_converter
- api/consts/tiers