Add new agnostic challonge provider

This commit is contained in:
2022-03-20 19:36:15 +01:00
parent 92b6d3e568
commit ee48b7d75c
17 changed files with 561 additions and 314 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using ChallongeCSharpDriver.Core.Results;
using LaDOSE.Entity;
using LaDOSE.Entity.Challonge;
namespace LaDOSE.Business.Interface
@@ -17,6 +18,8 @@ namespace LaDOSE.Business.Interface
Task<List<ChallongeParticipent>> GetParticipents(int idTournament);
Task<ChallongeTournament> GetTournament(int idTournament);
Task<ChallongeTournament> GetTournament(string urlTournament);
Task<List<Event>> GetEvents(List<int> idTournaments);
}
}

View File

@@ -1,21 +1,13 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using LaDOSE.Entity;
using LaDOSE.Entity.Challonge;
using LaDOSE.Entity;
using LaDOSE.Entity.Wordpress;
namespace LaDOSE.Business.Interface
{
public interface IEventService : IBaseService<Event>
{
Task<List<ChallongeTournament>> GetTournaments(DateTime? start, DateTime? end);
Task<TournamentsResult> GetTournamentsResult(List<int> ids);
Task<TournamentsResult> GetSmashResult(string tournamentSlug);
Task<TournamentsResult> GetSmashResult2(string tournamentSlug);
Event GetBySlug(string tournamentSlug);
Event GetByName(string name);
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using LaDOSE.Entity;
using LaDOSE.Entity.Challonge;
namespace LaDOSE.Business.Interface
{
public interface IExternalProviderService
{
Task<List<ChallongeTournament>> GetTournaments(DateTime? start, DateTime? end);
Task<TournamentsResult> GetTournamentsResult(List<int> ids);
Task<TournamentsResult> GetSmashResult(string tournamentSlug);
Task<TournamentsResult> GetSmashResult2(string tournamentSlug);
Task<List<Event>> GetChallongeEvents(List<int> ids);
}
}

View File

@@ -5,7 +5,7 @@ namespace LaDOSE.Business.Interface
{
public interface IGameService : IBaseService<Game>
{
public int? GetIdByName(string name);
}
}

View File

@@ -1,10 +1,12 @@
using LaDOSE.Business.Provider.SmashProvider;
using LaDOSE.Entity;
using LaDOSE.Entity.Challonge;
namespace LaDOSE.Business.Interface
{
public interface IPlayerService : IBaseService<Player>
{
int GetBySmash(ParticipantType participantUser);
int GetIdBySmash(ParticipantType participantUser);
int GetIdByName(ChallongeParticipent challongeParticipent);
}
}