diff --git a/src/Tgstation.Server.Client/Components/DreamMakerClient.cs b/src/Tgstation.Server.Client/Components/DreamMakerClient.cs index 5e8d2af1b9..942d252812 100644 --- a/src/Tgstation.Server.Client/Components/DreamMakerClient.cs +++ b/src/Tgstation.Server.Client/Components/DreamMakerClient.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api; @@ -12,11 +13,12 @@ namespace Tgstation.Server.Client.Components /// /// The for the /// - private IApiClient apiClient; + readonly IApiClient apiClient; + /// /// The for the /// - private Instance instance; + readonly Instance instance; /// /// Construct a @@ -32,6 +34,12 @@ namespace Tgstation.Server.Client.Components /// public Task Compile(CancellationToken cancellationToken) => apiClient.Create(Routes.DreamMaker, instance.Id, cancellationToken); + /// + public Task GetCompileJob(CompileJob compileJob, CancellationToken cancellationToken) => apiClient.Read(Routes.SetID(Routes.DreamMaker, compileJob?.Id ?? throw new ArgumentNullException(nameof(compileJob))), instance.Id, cancellationToken); + + /// + public Task> GetJobIds(CancellationToken cancellationToken) => apiClient.Read>(Routes.List(Routes.DreamMaker), instance.Id, cancellationToken); + /// public Task Read(CancellationToken cancellationToken) => apiClient.Read(Routes.DreamMaker, instance.Id, cancellationToken); diff --git a/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs b/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs index dd18119024..011475d5a5 100644 --- a/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs +++ b/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs @@ -1,4 +1,5 @@ -using System.Threading; +using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models; @@ -30,5 +31,20 @@ namespace Tgstation.Server.Client.Components /// The for the operation /// A resulting in the for the compile Task Compile(CancellationToken cancellationToken); + + /// + /// Gets the s of all s for the instance + /// + /// The for the operation + /// A resulting in a of s with only the field populated + Task> GetJobIds(CancellationToken cancellationToken); + + /// + /// Get a + /// + /// The to get + /// The for the operation + /// A resulting in the + Task GetCompileJob(CompileJob compileJob, CancellationToken cancellationToken); } }