mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
CLeanup and restructurisation
This commit is contained in:
1 parent
bfb9f11035
commit
8faccd45c9
104 files changed
+124
-2056
No files matched your search
@@ -0,0 +1,54 @@
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
using WotBlitzStatisticsPro.Logic;
|
||||
|
||||
namespace WotBlitzStatisticsPro.GraphQl.Query
|
||||
{
|
||||
public class WotBlitzStatisticsQuery
|
||||
{
|
||||
// 571050560 - mboga Eu
|
||||
// 90277267 - Mboga Ru
|
||||
|
||||
private readonly IWargamingSearch _wargamingSearcher;
|
||||
|
||||
public WotBlitzStatisticsQuery(IWargamingSearch wargamingSearcher)
|
||||
{
|
||||
_wargamingSearcher = wargamingSearcher;
|
||||
}
|
||||
|
||||
//public Task<AccountInfo> GetPlayerInfo(long accountId)
|
||||
//{
|
||||
// return _wargamingSearcher.GetPlayerAccountInfo(accountId);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Finds Wargaming accounts by nick
|
||||
/// </summary>
|
||||
/// <param name="accountNick">Search string.</param>
|
||||
/// <param name="realmType">Wargaming Realm.</param>
|
||||
/// <param name="language">Language for the output data.</param>
|
||||
/// <returns></returns>
|
||||
public Task<AccountsSearchResponse> FindAccounts(
|
||||
string accountNick,
|
||||
RealmType? realmType,
|
||||
RequestLanguage? language)
|
||||
{
|
||||
return _wargamingSearcher.FindAccounts(accountNick, realmType ?? RealmType.Ru, language ?? RequestLanguage.En);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds clans by search string
|
||||
/// </summary>
|
||||
/// <param name="searchString">Search string.</param>
|
||||
/// <param name="realmType">Wargaming Realm.</param>
|
||||
/// <param name="language">Language for the output data.</param>
|
||||
/// <returns></returns>
|
||||
public Task<ClanSearchResponse> FindClans(
|
||||
string searchString,
|
||||
RealmType? realmType,
|
||||
RequestLanguage? language)
|
||||
{
|
||||
return _wargamingSearcher.FindClans(searchString, realmType ?? RealmType.Ru, language ?? RequestLanguage.En);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user