mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
feat: vehicles dictionary call in client
This commit is contained in:
1 parent
8a9f2f7077
commit
7b57ee9c80
10 files changed
+116
-86
No files matched your search
@@ -88,6 +88,13 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
||||
CheckErrors(result.Errors);
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<IDictionary_Vehicles>> GetVehiclesByNation(string nationId)
|
||||
{
|
||||
var result = await _client.Dictionary.ExecuteAsync(nationId, GetLanguage());
|
||||
CheckErrors(result.Errors);
|
||||
return result.Data?.Vehicles;
|
||||
}
|
||||
|
||||
private RequestLanguage GetLanguage()
|
||||
{
|
||||
var culture = CultureInfo.CurrentCulture;
|
||||
|
||||
@@ -33,5 +33,7 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
||||
Task<string> Logout(
|
||||
string token,
|
||||
RealmType realmType);
|
||||
|
||||
Task<IReadOnlyList<IDictionary_Vehicles>> GetVehiclesByNation(string nationId);
|
||||
}
|
||||
}
|
||||
@@ -408,5 +408,9 @@ namespace WotBlitzStatisticsPro.Blazor.Services.Mock
|
||||
{
|
||||
return Task.FromResult("Fake logout");
|
||||
}
|
||||
public async Task<IReadOnlyList<IDictionary_Vehicles>> GetVehiclesByNation(string nationId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user