Skip to content

ed555009/alchemy-notify-api-client

Repository files navigation

Alchemy.Notify.Api.Client

GitHub Build Status Nuget

Coverage Quality Gate Status Reliability Rating Security Rating Vulnerabilities

Description

This is a .NET6 library for interacting with the Alchemy Notify Api.

Quick start

Installation

dotnet add package Alchemy.Notify.Api.Client

Appsettings.json

{
	"Alchemy": {
		"NotifyApi": {
			"BaseUrl": "https://dashboard.alchemy.com",
			"AuthToken": "YOUR_ALCHEMY_AUTH_TOKEN"
		}
	}
}

Add services

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 services

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();
	}
}

Reference

About

A nuget package for Alchemy Notify Api client using .NET6

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages