BrigitAPI C# Client Initialization Guide
Introduction
This guide provides instructions on how to use the BrigitApiClient in your C# application. The client uses Basic Authentication and requires a username, password, and base URL for proper configuration.
Prerequisites
Add the NuGet package
Install-Package BrigitSoftware.Brigit.Api.Client
Or use the NuGet package manager in Visual Studio. Find the package by searching for BrigitSoftware.Brigit.Api.Client.
Add the namespace
using BrigitSoftware.Brigit.Api.Client;
Step-by-Step Guide
Initialize the BrigitApiClient
To initialize the BrigitApiClient, you need to provide an instance of BrigitApiClientOptions with the required values and an instance of HttpClient.
Here's an example of how to do this:
// Define the options with your specific credentials and base URL
var options = new BrigitApiClientOptions
{
BaseUrl = "https://api-v1.test.brigit.online",
Username = "your-username",
Password = "your-password"
};
// Create an instance of HttpClient
var httpClient = new HttpClient();
// Initialize the BrigitApiClient
var api = new BrigitApiClient(options, httpClient);
Using the Client
var clients = api.GetClients();