mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
feat: Clan Resolver first step
This commit is contained in:
1 parent
7f713e5357
commit
8fb1b170df
11 files changed
+203
-2
No files matched your search
@@ -0,0 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Logic
|
||||
{
|
||||
public interface IWargamingClans
|
||||
{
|
||||
Task<ClanInfoResponse> GelClanInfoByAccount(long accountId, RealmAndLanguage queryParams);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Logic
|
||||
{
|
||||
public class WargamingClans: IWargamingClans
|
||||
{
|
||||
private const RealmType DefaultRealm = RealmType.Ru;
|
||||
private const RequestLanguage DefaultRequestLanguage = RequestLanguage.En;
|
||||
|
||||
public Task<ClanInfoResponse> GelClanInfoByAccount(long accountId, RealmAndLanguage queryParams)
|
||||
{
|
||||
// ToDo: Make Wargaming request
|
||||
return Task.FromResult(new ClanInfoResponse {ClanId = 42, Name = "Fake clan"});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ namespace WotBlitzStatisticsPro.Logic
|
||||
services.AddTransient<IWargamingSearch, WargamingSearch>();
|
||||
services.AddTransient<IWargamingDictionaries, WargamingDictionaries>();
|
||||
services.AddTransient<IWargamingAccounts, WargamingAccounts>();
|
||||
services.AddTransient<IWargamingClans, WargamingClans>();
|
||||
}
|
||||
|
||||
private static void ConfigureDictionariesFactory(IServiceCollection services)
|
||||
|
||||
Reference in new issue
Block a user