An API client for shlink.io.
Initialization:
var restClient = ShlinkRestClient.Create("https://sh.link.cf", "1b7f1396-0c14-48ea-b581-07c2bf229ca1");
var apiClient = new ShlinkApiClient(restClient);
Enumerating through all shorted links:
await foreach (var it in apiClient.EnumerateShortUrls())
{
Console.WriteLine($"{it.ShortCode}: {it.LongUrl}");
}
Creating a new shortlink:
var res = await apiClient.CreateOrUpdateAsync(new CreateShortUrlWithSlugRequest
{
LongUrl = "https://www.google.at",
ShortCode = "google"
});