2025-09-22 00:29:51 -05:00
|
|
|
|
using LANCommander.SDK.Models;
|
2024-08-11 14:48:00 -05:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2025-09-22 00:29:51 -05:00
|
|
|
|
using LANCommander.SDK.Factories;
|
2024-08-11 14:48:00 -05:00
|
|
|
|
|
2024-10-04 23:37:49 -05:00
|
|
|
|
namespace LANCommander.SDK.Services
|
2024-08-11 14:48:00 -05:00
|
|
|
|
{
|
2025-09-24 20:58:23 -05:00
|
|
|
|
public class IssueClient(ApiRequestFactory apiRequestFactory)
|
2024-08-11 14:48:00 -05:00
|
|
|
|
{
|
|
|
|
|
|
public async Task<bool> Open(string description, Guid gameId)
|
|
|
|
|
|
{
|
2025-09-22 00:29:51 -05:00
|
|
|
|
return await apiRequestFactory
|
|
|
|
|
|
.Create()
|
|
|
|
|
|
.UseAuthenticationToken()
|
|
|
|
|
|
.UseVersioning()
|
|
|
|
|
|
.UseRoute("/api/Issue/Open")
|
|
|
|
|
|
.AddBody(new Issue
|
|
|
|
|
|
{
|
|
|
|
|
|
Description = description,
|
|
|
|
|
|
GameId = gameId,
|
|
|
|
|
|
})
|
|
|
|
|
|
.PostAsync<bool>();
|
2024-08-11 14:48:00 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|