Files
FsToolbox/Cli/Program.cs
2025-12-12 08:23:19 +01:00

30 lines
913 B
C#

using System.Net.Http;
using System.Net.Http.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using FsToolbox.Cli;
// See https://aka.ms/new-console-template for more information
using var httpClient = new HttpClient();
// Show menu for the user to choose from the two tasks
Console.WriteLine("Choose a task to execute:");
Console.WriteLine("1. Check Aldi Memberships");
Console.WriteLine("2. Confirm all Unconfirmed Pickups for Lindenberg");
Console.Write("Enter the number of the task to execute (or any other key to exit): ");
var choice = Console.ReadLine();
switch (choice)
{
case "1":
await CustomTasks.CheckAldiMembershipsAsync(httpClient);
break;
case "2":
await CustomTasks.ConfirmUnconfirmedPickupsLindenbergAsync(httpClient);
break;
default:
Console.WriteLine("Exiting...");
break;
}