mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
feat: Passing Wargaming Token for Gather application mutation
This commit is contained in:
1 parent
0b5da2f7c6
commit
c9f933235c
8 files changed
+50
-17
No files matched your search
@@ -17,7 +17,8 @@ namespace WotBlitzStatisticsPro.WgApiClient
|
||||
|
||||
Task<WotAccountInfo?> GetPlayerAccountInfo(long accountId,
|
||||
RealmType realmType = RealmType.Ru,
|
||||
RequestLanguage language = RequestLanguage.En);
|
||||
RequestLanguage language = RequestLanguage.En,
|
||||
string? authenticationToken = null);
|
||||
|
||||
Task<ClanAccountInfo?> GetPlayerClanInfo(long accountId,
|
||||
RealmType realmType = RealmType.Ru,
|
||||
|
||||
@@ -94,15 +94,24 @@ namespace WotBlitzStatisticsPro.WgApiClient
|
||||
|
||||
|
||||
|
||||
public async Task<WotAccountInfo?> GetPlayerAccountInfo(long accountId,
|
||||
public async Task<WotAccountInfo?> GetPlayerAccountInfo(
|
||||
long accountId,
|
||||
RealmType realmType = RealmType.Ru,
|
||||
RequestLanguage language = RequestLanguage.En)
|
||||
RequestLanguage language = RequestLanguage.En,
|
||||
string? authenticationToken = null)
|
||||
{
|
||||
var account = await GetFromBlitzApi<Dictionary<string, WotAccountInfo>>(
|
||||
realmType,
|
||||
language,
|
||||
"account/info/",
|
||||
$"account_id={accountId}").ConfigureAwait(false);
|
||||
var account = authenticationToken == null
|
||||
? await GetFromBlitzApi<Dictionary<string, WotAccountInfo>>(
|
||||
realmType,
|
||||
language,
|
||||
"account/info/",
|
||||
$"account_id={accountId}").ConfigureAwait(false)
|
||||
: await GetFromBlitzApi<Dictionary<string, WotAccountInfo>>(
|
||||
realmType,
|
||||
language,
|
||||
"account/info/",
|
||||
$"account_id={accountId}",
|
||||
$"access_token={authenticationToken}").ConfigureAwait(false);
|
||||
return account?[accountId.ToString()];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user