mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
This provide a hidden Velopack Flow API command. This allows for easier scripting directly against the API as it leveraging the built in auth.
18 lines
485 B
C#
18 lines
485 B
C#
using System.Threading;
|
|
using Velopack.Packaging.Abstractions;
|
|
using Velopack.Packaging.Flow;
|
|
|
|
namespace Velopack.Vpk.Commands.Flow;
|
|
#nullable enable
|
|
|
|
public class LoginCommandRunner(IVelopackFlowServiceClient Client) : ICommand<LoginOptions>
|
|
{
|
|
public async Task Run(LoginOptions options)
|
|
{
|
|
await Client.LoginAsync(new() {
|
|
VelopackBaseUrl = options.VelopackBaseUrl,
|
|
ApiKey = options.ApiKey,
|
|
}, false, CancellationToken.None);
|
|
}
|
|
}
|