getSummonerByAccountId method

Future<SummonerDto> getSummonerByAccountId(
  1. PlatformRoutingValue region,
  2. String accountId
)

Implementation

Future<SummonerDto> getSummonerByAccountId(
  PlatformRoutingValue region,
  String accountId,
) async {
  final url =
      'https://${PLATFORM_ROUTING_VALUES[region]}/lol/summoner/v4/summoners/by-account/$accountId';
  final response = await get(url);

  return SummonerDto.fromJson(response!.data);
}