This is a .NET6 library for interacting with the Alchemy Notify Api.
dotnet add package Alchemy.Notify.Api.Client
{
"Alchemy": {
"NotifyApi": {
"BaseUrl": "https://dashboard.alchemy.com",
"AuthToken": "YOUR_ALCHEMY_AUTH_TOKEN"
}
}
}
using Alchemy.Notify.Api.Client.Extensions;
ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
// this injects as SINGLETON
services.AddAlchemyNotifyApiServices(configuration);
// you can also inject as SCOPED or TRANSIENT by specifying the ServiceLifetime
services.AddAlchemyNotifyApiServices(configuration, ServiceLifetime.Scoped);
}
using Alchemy.Notify.Api.Client.Interfaces;
using Alchemy.Notify.Api.Client.Services;
public class MyProcess
{
private readonly INotifyService _notifyService;
public MyProcess(INotifyService notifyService) =>
_notifyService = notifyService;
public async Task GetAllWebhooksAsync()
{
var webhooks = await _notifyService.GetAllWebhooksAsync();
}
}