diff --git a/src/Tgstation.Server.Client/Components/ByondClient.cs b/src/Tgstation.Server.Client/Components/ByondClient.cs index e75c47110c..92c2f8aba5 100644 --- a/src/Tgstation.Server.Client/Components/ByondClient.cs +++ b/src/Tgstation.Server.Client/Components/ByondClient.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api; @@ -30,9 +31,12 @@ namespace Tgstation.Server.Client.Components } /// - public Task Read(CancellationToken cancellationToken) => apiClient.Read(Routes.Byond, instance.Id, cancellationToken); + public Task ActiveVersion(CancellationToken cancellationToken) => apiClient.Read(Routes.Byond, instance.Id, cancellationToken); /// - public Task Update(Byond byond, CancellationToken cancellationToken) => apiClient.Update(Routes.Byond, byond ?? throw new ArgumentNullException(nameof(byond)), instance.Id, cancellationToken); + public Task> InstalledVersions(CancellationToken cancellationToken) => apiClient.Read>(Routes.List(Routes.Byond), instance.Id, cancellationToken); + + /// + public Task SetActiveVersion(Byond byond, CancellationToken cancellationToken) => apiClient.Update(Routes.Byond, byond ?? throw new ArgumentNullException(nameof(byond)), instance.Id, cancellationToken); } } \ No newline at end of file diff --git a/src/Tgstation.Server.Client/Components/IByondClient.cs b/src/Tgstation.Server.Client/Components/IByondClient.cs index bfe9e8f003..da4f4d45a3 100644 --- a/src/Tgstation.Server.Client/Components/IByondClient.cs +++ b/src/Tgstation.Server.Client/Components/IByondClient.cs @@ -1,4 +1,5 @@ -using System.Threading; +using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models; @@ -10,11 +11,18 @@ namespace Tgstation.Server.Client.Components public interface IByondClient { /// - /// Get the information + /// Get the active information /// /// The for the operation - /// A resulting in the information - Task Read(CancellationToken cancellationToken); + /// A resulting in the active information + Task ActiveVersion(CancellationToken cancellationToken); + + /// + /// Get all installed s + /// + /// The for the operation + /// A resulting in an of installed s + Task> InstalledVersions(CancellationToken cancellationToken); /// /// Updates the information @@ -22,6 +30,6 @@ namespace Tgstation.Server.Client.Components /// The information to update /// The for the operation /// A resulting in the updated information - Task Update(Byond byond, CancellationToken cancellationToken); + Task SetActiveVersion(Byond byond, CancellationToken cancellationToken); } } diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index 7b97f583c8..f5bbc82a26 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -3,7 +3,7 @@ netstandard2.0 Full - 4.0.0.0-preview9103 + 4.0.0.0-preview9104 true Cyberboss /tg/station 13