mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
Preperation for savig account data
This commit is contained in:
1 parent
5e0369511f
commit
91f69a6e39
5 files changed
+75
-14
No files matched your search
@@ -10,10 +10,13 @@ namespace WotBlitzStatisticsPro.GraphQl.Query
|
||||
// 90277267 - Mboga Ru
|
||||
|
||||
private readonly IWargamingSearch _wargamingSearcher;
|
||||
private readonly IWargamingAccounts _wargamingAccounts;
|
||||
|
||||
public WotBlitzStatisticsQuery(IWargamingSearch wargamingSearcher)
|
||||
public WotBlitzStatisticsQuery(IWargamingSearch wargamingSearcher,
|
||||
IWargamingAccounts wargamingAccounts)
|
||||
{
|
||||
_wargamingSearcher = wargamingSearcher;
|
||||
_wargamingAccounts = wargamingAccounts;
|
||||
}
|
||||
|
||||
//public Task<AccountInfo> GetPlayerInfo(long accountId)
|
||||
@@ -50,5 +53,20 @@ namespace WotBlitzStatisticsPro.GraphQl.Query
|
||||
{
|
||||
return _wargamingSearcher.FindClans(searchString, realmType ?? RealmType.Ru, language ?? RequestLanguage.En);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gathers all account information
|
||||
/// </summary>
|
||||
/// <param name="realmType">Account region</param>
|
||||
/// <param name="accountId">AccountId</param>
|
||||
/// <param name="requestLanguage">Request language</param>
|
||||
public Task<AccountInfoResponse> AccountInfo(
|
||||
long accountId,
|
||||
RealmType? realmType,
|
||||
RequestLanguage? requestLanguage
|
||||
)
|
||||
{
|
||||
return _wargamingAccounts.GatherAccountInformation(realmType ?? RealmType.Ru, accountId, requestLanguage ?? RequestLanguage.En);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user