using t = System.Threading.Tasks;
using Dime.Scheduler.Sdk;
using Dime.Scheduler.Sdk.Import;
public static async t.Task Main()
Console.WriteLine("Adding/updating a category to Dime.Scheduler");
const string uri = "http://ds-vnext-test.azurewebsites.net/";
const string user = "hello@dimescheduler.com";
const string pw = "q3EeCt5mXu'f!uE";
IAuthenticator authenticator = new FormsAuthenticator(uri, user, pw);
DimeSchedulerClient client = new(uri, authenticator);
IImportEndpoint importEndpoint = await client.Import.Request();
string name = "Hello from .NET Fiddle!";
Category category = new() { DisplayName = name, Name = name, Color = "#a185f0" };
await importEndpoint.ProcessAsync(category, TransactionType.Append);
Console.WriteLine("Something went wrong: " + ex.Message);