Compare commits
4 Commits
91664406c4
...
release-20
| Author | SHA1 | Date | |
|---|---|---|---|
| e99479d8fb | |||
| a9150ff58c | |||
| fba822a0af | |||
| 73407e5867 |
@@ -19,7 +19,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a dotnet version
|
# Semantic version range syntax or exact version of a dotnet version
|
||||||
dotnet-version: '6.x'
|
dotnet-version: '8.x'
|
||||||
|
|
||||||
- run: echo "Build."
|
- run: echo "Build."
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
@@ -36,8 +36,8 @@ jobs:
|
|||||||
dotnet build --configuration Release --os win LaDOSE.DesktopApp.Avalonia
|
dotnet build --configuration Release --os win LaDOSE.DesktopApp.Avalonia
|
||||||
- name: Zip file
|
- name: Zip file
|
||||||
run: |
|
run: |
|
||||||
zip -rj build-winx64.zip ./LaDOSE.Src/LaDOSE.DesktopApp.Avalonia/bin/Release/net6.0/win-x64/
|
zip -rj build-winx64.zip ./LaDOSE.Src/LaDOSE.DesktopApp.Avalonia/bin/Release/net8.0/win-x64/
|
||||||
zip -rj build-linux64.zip ./LaDOSE.Src/LaDOSE.DesktopApp.Avalonia/bin/Release/net6.0/linux-x64/
|
zip -rj build-linux64.zip ./LaDOSE.Src/LaDOSE.DesktopApp.Avalonia/bin/Release/net8.0/linux-x64/
|
||||||
- name: Upload Artifact Windows
|
- name: Upload Artifact Windows
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -54,10 +54,15 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "date=$(echo $(date +'%Y-%m-%d'))" >> $GITHUB_OUTPUT
|
||||||
- name: Release
|
- name: Release
|
||||||
|
if: github.ref_name == 'master'
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
env:
|
env:
|
||||||
with:
|
with:
|
||||||
|
tag_name: release-${{ steps.date.outputs.date }}
|
||||||
files: |-
|
files: |-
|
||||||
build-winx64.zip
|
build-winx64.zip
|
||||||
build-linux64.zip
|
build-linux64.zip
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace LaDOSE.Api.Controllers
|
|||||||
[HttpGet("UpdateDb")]
|
[HttpGet("UpdateDb")]
|
||||||
public bool UpdateDb()
|
public bool UpdateDb()
|
||||||
{
|
{
|
||||||
return _service.UpdateBooking();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("CreateChallonge/{gameId:int}/{wpEventId:int}")]
|
[HttpGet("CreateChallonge/{gameId:int}/{wpEventId:int}")]
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -10,13 +11,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="10.0.0" />
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.8" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.12" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.12" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.8" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.11" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ namespace LaDOSE.DTO
|
|||||||
public List<GameDTO> Games { get; set; }
|
public List<GameDTO> Games { get; set; }
|
||||||
|
|
||||||
public List<ResultDTO> Results { get; set; }
|
public List<ResultDTO> Results { get; set; }
|
||||||
|
|
||||||
|
public string Slug { get; set; }
|
||||||
}
|
}
|
||||||
public class ResultDTO
|
public class ResultDTO
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -24,8 +25,8 @@
|
|||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.3" />
|
||||||
<PackageReference Include="MessageBox.Avalonia" Version="3.2.0" />
|
<PackageReference Include="MessageBox.Avalonia" Version="3.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ sealed class Program
|
|||||||
var restUser = builder["REST:User"].ToString();
|
var restUser = builder["REST:User"].ToString();
|
||||||
var restPassword = builder["REST:Password"].ToString();
|
var restPassword = builder["REST:Password"].ToString();
|
||||||
|
|
||||||
currentMutable.RegisterLazySingleton<RestService>(() =>
|
currentMutable.Register<RestService>(() =>
|
||||||
{
|
{
|
||||||
var restService = new RestService();
|
var restService = new RestService(new Uri(restUrl), restUser, restPassword);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
restService.Connect(new Uri(restUrl), restUser, restPassword);
|
restService.Connect(new Uri(restUrl), restUser, restPassword);
|
||||||
@@ -53,7 +53,7 @@ sealed class Program
|
|||||||
|
|
||||||
return restService;
|
return restService;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avalonia configuration, don't remove; also used by visual designer.
|
// Avalonia configuration, don't remove; also used by visual designer.
|
||||||
|
|||||||
@@ -223,8 +223,8 @@ namespace LaDOSE.DesktopApp.Avalonia.ViewModels
|
|||||||
this.To = new DateTimeOffset(DateTime.Now);
|
this.To = new DateTimeOffset(DateTime.Now);
|
||||||
this.From = new DateTimeOffset(DateTime.Now.AddMonths(-1));
|
this.From = new DateTimeOffset(DateTime.Now.AddMonths(-1));
|
||||||
this.SelectRegex = "Ranking";
|
this.SelectRegex = "Ranking";
|
||||||
this.SelectEventRegex = @"Ranking #10\d{2}";
|
this.SelectEventRegex = @"Ranking #13\d{2}";
|
||||||
this.Slug = "ranking-1001";
|
this.Slug = "ranking-130";
|
||||||
|
|
||||||
LoadTournaments();
|
LoadTournaments();
|
||||||
LoadEvents();
|
LoadEvents();
|
||||||
@@ -472,7 +472,7 @@ namespace LaDOSE.DesktopApp.Avalonia.ViewModels
|
|||||||
string url = enumerable.FirstOrDefault()?.TournamentUrl;
|
string url = enumerable.FirstOrDefault()?.TournamentUrl;
|
||||||
url = url.Replace(" ", "-");
|
url = url.Replace(" ", "-");
|
||||||
url = url.Replace(".", "-");
|
url = url.Replace(".", "-");
|
||||||
sb.AppendLine($"<a href=\"https://smash.gg/tournament/ranking-1002/event/{url}\" target=\"_blank\">Voir le Bracket</p></td>");
|
sb.AppendLine($"<a href=\"https://start.gg/tournament/{Results.Slug}/event/{url}\" target=\"_blank\">Voir le Bracket</p></td>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DSharpPlus" Version="4.2.0" />
|
<PackageReference Include="DSharpPlus" Version="4.5.0" />
|
||||||
<PackageReference Include="DSharpPlus.CommandsNext" Version="4.2.0" />
|
<PackageReference Include="DSharpPlus.CommandsNext" Version="4.5.0" />
|
||||||
<PackageReference Include="DSharpPlus.Interactivity" Version="4.2.0" />
|
<PackageReference Include="DSharpPlus.Interactivity" Version="4.5.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.8" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.8" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace LaDOSE.Entity.Challonge
|
|||||||
public List<Game> Games{ get; set; }
|
public List<Game> Games{ get; set; }
|
||||||
|
|
||||||
public List<Result> Results { get; set; }
|
public List<Result> Results { get; set; }
|
||||||
|
public string Slug { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Result
|
public class Result
|
||||||
|
|||||||
@@ -2,12 +2,18 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" />
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.EntityFrameworkCore">
|
||||||
|
<HintPath>..\..\..\..\.nuget\packages\microsoft.entityframeworkcore\8.0.11\lib\net8.0\Microsoft.EntityFrameworkCore.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="RestSharp" Version="110.2.0" />
|
<PackageReference Include="RestSharp" Version="112.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -29,13 +29,19 @@ namespace LaDOSE.REST
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public RestService(Uri url, string user, string password)
|
||||||
|
|
||||||
public void Connect(Uri url, string user, string password)
|
|
||||||
{
|
{
|
||||||
Client = new RestClient(url);
|
Client = new RestClient(url);
|
||||||
this.username = user;
|
this.username = user;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Connect(Uri url, string user, string password)
|
||||||
|
{
|
||||||
|
// Client = new RestClient(url);
|
||||||
|
// this.username = user;
|
||||||
|
// this.password = password;
|
||||||
string token;
|
string token;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -79,7 +85,7 @@ namespace LaDOSE.REST
|
|||||||
|
|
||||||
private void CheckToken()
|
private void CheckToken()
|
||||||
{
|
{
|
||||||
if (this.Auth == null || this.Auth.Expire <= DateTime.Now)
|
if (this.Auth == null || this.Auth.Expire.ToUniversalTime() <= DateTime.Now.ToUniversalTime())
|
||||||
{
|
{
|
||||||
GetToken(this.username,this.password);
|
GetToken(this.username,this.password);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace LaDOSE.Business.Interface
|
|||||||
List<WPEvent> GetWpEvent();
|
List<WPEvent> GetWpEvent();
|
||||||
List<WPUser> GetBooking(int wpEventId, Game game);
|
List<WPUser> GetBooking(int wpEventId, Game game);
|
||||||
List<WPUser> GetBookingOptions(int wpEventId, Game game);
|
List<WPUser> GetBookingOptions(int wpEventId, Game game);
|
||||||
bool UpdateBooking();
|
|
||||||
string CreateChallonge(int gameId, int wpEventId, IList<WPUser> additionPlayers);
|
string CreateChallonge(int gameId, int wpEventId, IList<WPUser> additionPlayers);
|
||||||
|
|
||||||
Task<string> GetLastChallonge();
|
Task<string> GetLastChallonge();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<AssemblyName>LaDOSE.Business</AssemblyName>
|
<AssemblyName>LaDOSE.Business</AssemblyName>
|
||||||
<RootNamespace>LaDOSE.Business</RootNamespace>
|
<RootNamespace>LaDOSE.Business</RootNamespace>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="GraphQL.Client" Version="4.0.2" />
|
<PackageReference Include="GraphQL.Client" Version="6.1.0" />
|
||||||
<PackageReference Include="GraphQL.Client.Serializer.Newtonsoft" Version="4.0.2" />
|
<PackageReference Include="GraphQL.Client.Serializer.Newtonsoft" Version="6.1.0" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace LaDOSE.Business.Provider.SmashProvider
|
|||||||
{
|
{
|
||||||
public class SmashProvider : ISmashProvider
|
public class SmashProvider : ISmashProvider
|
||||||
{
|
{
|
||||||
|
private static string API_FQDN = "api.start.gg";
|
||||||
public string ApiKey { get; set; }
|
public string ApiKey { get; set; }
|
||||||
//public SmashProvider(string apiKey)
|
//public SmashProvider(string apiKey)
|
||||||
//{
|
//{
|
||||||
@@ -34,7 +35,7 @@ namespace LaDOSE.Business.Provider.SmashProvider
|
|||||||
|
|
||||||
private async Task<T> QuerySmash<T>(GraphQLRequest req)
|
private async Task<T> QuerySmash<T>(GraphQLRequest req)
|
||||||
{
|
{
|
||||||
var graphQLClient = new GraphQLHttpClient("https://api.smash.gg/gql/alpha", new NewtonsoftJsonSerializer());
|
var graphQLClient = new GraphQLHttpClient($"https://{API_FQDN}/gql/alpha", new NewtonsoftJsonSerializer());
|
||||||
graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
||||||
|
|
||||||
var graphQLResponse = await graphQLClient.SendQueryAsync<T>(req);
|
var graphQLResponse = await graphQLClient.SendQueryAsync<T>(req);
|
||||||
@@ -346,7 +347,7 @@ namespace LaDOSE.Business.Provider.SmashProvider
|
|||||||
public async Task<TournamentResponse> GetNames(string slug)
|
public async Task<TournamentResponse> GetNames(string slug)
|
||||||
{
|
{
|
||||||
|
|
||||||
var graphQLClient = new GraphQLHttpClient("https://api.smash.gg/gql/alpha", new NewtonsoftJsonSerializer());
|
var graphQLClient = new GraphQLHttpClient($"https://{API_FQDN}/gql/alpha", new NewtonsoftJsonSerializer());
|
||||||
graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
||||||
var Event = new GraphQLRequest
|
var Event = new GraphQLRequest
|
||||||
{
|
{
|
||||||
@@ -412,7 +413,7 @@ namespace LaDOSE.Business.Provider.SmashProvider
|
|||||||
public async Task<TournamentResponse> GetTournament(string slug)
|
public async Task<TournamentResponse> GetTournament(string slug)
|
||||||
{
|
{
|
||||||
|
|
||||||
var graphQLClient = new GraphQLHttpClient("https://api.smash.gg/gql/alpha", new NewtonsoftJsonSerializer());
|
var graphQLClient = new GraphQLHttpClient($"https://{API_FQDN}/gql/alpha", new NewtonsoftJsonSerializer());
|
||||||
graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
||||||
var Event = new GraphQLRequest
|
var Event = new GraphQLRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using LaDOSE.Entity.BotEvent;
|
|||||||
using LaDOSE.Entity.Context;
|
using LaDOSE.Entity.Context;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
|
||||||
namespace LaDOSE.Business.Service
|
namespace LaDOSE.Business.Service
|
||||||
{
|
{
|
||||||
public class BotEventService : BaseService<BotEvent>, IBotEventService
|
public class BotEventService : BaseService<BotEvent>, IBotEventService
|
||||||
|
|||||||
@@ -148,10 +148,14 @@ namespace LaDOSE.Business.Service
|
|||||||
players = players.Concat(e.Tournaments.SelectMany(e => e.Results.Select(e => e.Player)).Distinct().ToList()).ToList();
|
players = players.Concat(e.Tournaments.SelectMany(e => e.Results.Select(e => e.Player)).Distinct().ToList()).ToList();
|
||||||
cevent.Tournaments = cevent.Tournaments.Concat(e.Tournaments).ToList();
|
cevent.Tournaments = cevent.Tournaments.Concat(e.Tournaments).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
var games = _context.Game.ToList();
|
var games = _context.Game.ToList();
|
||||||
|
|
||||||
TournamentsResult result = new TournamentsResult();
|
TournamentsResult result = new TournamentsResult();
|
||||||
|
if (id.Count == 1)
|
||||||
|
{
|
||||||
|
result.Slug = _context.Event.Where(e=> e.Id == id.First()).First().SmashSlug;
|
||||||
|
}
|
||||||
result.Results = new List<Result>();
|
result.Results = new List<Result>();
|
||||||
result.Games = new List<Game>();
|
result.Games = new List<Game>();
|
||||||
result.Participents = new List<ChallongeParticipent>();
|
result.Participents = new List<ChallongeParticipent>();
|
||||||
|
|||||||
@@ -42,14 +42,7 @@ namespace LaDOSE.Business.Service
|
|||||||
.Include(e => e.WPBookings).ThenInclude(e => e.WPUser).FirstOrDefault(e => Enumerable.Count<WPBooking>(e.WPBookings) != 0);
|
.Include(e => e.WPBookings).ThenInclude(e => e.WPUser).FirstOrDefault(e => Enumerable.Count<WPBooking>(e.WPBookings) != 0);
|
||||||
return wpEvents;
|
return wpEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UpdateBooking()
|
|
||||||
{
|
|
||||||
_context.Database.SetCommandTimeout(60);
|
|
||||||
_context.Database.ExecuteSqlRaw("call ladoseapi.ImportEvent();");
|
|
||||||
_context.Database.SetCommandTimeout(30);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
public List<WPUser> GetBooking(int wpEventId, Game game)
|
public List<WPUser> GetBooking(int wpEventId, Game game)
|
||||||
{
|
{
|
||||||
var selectedGameWpId = game.WordPressTag.Split(';');
|
var selectedGameWpId = game.WordPressTag.Split(';');
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
internal class Program
|
internal class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
|
||||||
Console.WriteLine("Rest Test");
|
|
||||||
var p = new LaDOSE.REST.RestService();
|
|
||||||
Console.WriteLine("[+] Connect");
|
|
||||||
|
|
||||||
p.Connect(new Uri("http://localhost:5000/"),"dev","dev");
|
|
||||||
Console.WriteLine("[+] Test");
|
|
||||||
var games = p.GetGames();
|
|
||||||
foreach (var ga in games)
|
|
||||||
{
|
{
|
||||||
Console.WriteLine(ga.Name);
|
// Console.WriteLine("Rest Test");
|
||||||
}
|
// var p = new LaDOSE.REST.RestService();
|
||||||
|
// Console.WriteLine("[+] Connect");
|
||||||
|
//
|
||||||
|
// p.Connect(new Uri("http://localhost:5000/"),"dev","dev");
|
||||||
|
// Console.WriteLine("[+] Test");
|
||||||
|
// var games = p.GetGames();
|
||||||
|
// foreach (var ga in games)
|
||||||
|
// {
|
||||||
|
// Console.WriteLine(ga.Name);
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "6.0.0",
|
"version": "8.0.0",
|
||||||
"rollForward": "latestMajor",
|
"rollForward": "latestMajor",
|
||||||
"allowPrerelease": true
|
"allowPrerelease": true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user