Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.32 KB

File metadata and controls

41 lines (33 loc) · 1.32 KB

Acuity Scheduling API - C# Library

Welcome to the Acuity Scheduling C# SDK. This SDK provides examples and a standard library for integrating with the Acuity Scheduling API using .Net. You can learn more about developing for Acuity Scheduling at developers.acuityscheduling.com.

Installation

This package can be installed via the nuget package manager.

.NET CLI

$ dotnet add package AcuityScheduling.API --version 1.0.0-alpha3

Package Manager

PS C:\ProjectDir\> Install-Package AcuityScheduling.API -Version 1.0.0-alpha3

Package Reference

<PackageReference Include="AcuityScheduling.API" Version="1.0.0-alpha3" />

Packet CLI

$ paket add AcuityScheduling.API --version 1.0.0-alpha3

Examples

Getting a list of Appointments

var httpClient = new HttpClient();
var byteArray = Encoding.ASCII.GetBytes("username:password");
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
var client = new Client(httpClient)
{
    BaseUrl = "https://acuityscheduling.com/api/v1/"
};
var x = await client.ListAppointmentsAsync();
Console.WriteLine(JsonConvert.SerializeObject(x, Formatting.Indented));