Freshdesk.Api 0.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Freshdesk.Api --version 0.5.0
NuGet\Install-Package Freshdesk.Api -Version 0.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Freshdesk.Api" Version="0.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Freshdesk.Api --version 0.5.0
#r "nuget: Freshdesk.Api, 0.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Freshdesk.Api as a Cake Addin
#addin nuget:?package=Freshdesk.Api&version=0.5.0

// Install Freshdesk.Api as a Cake Tool
#tool nuget:?package=Freshdesk.Api&version=0.5.0

Build Status

Freshdesk API Client

This is a dotnet standard library providing a thin wrapper around the Freshdesk API as described here: https://developers.freshdesk.com/api.

At present this library requires .NET Standard 2.1 (for IAsyncEnumerable), if I get interest then I'll build a version of the library which doesn't make use of that feature and is therefore available in .NET Standard 2.0 (or possibly lower)

Usage

This library provides a single client class which can be created in one of several ways:

  1. No existing HttpClient object (suitable for console applications)
using var freshdeskClient = new FreshdeskClient("https://mydomain.freshdesk.com", "APIKEY");

NOTE: Disposing the freshdeskClient will dispose the HttpClient object, as per https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/ you need to be careful when disposing HttpClient objects. Broadly speaking, don't make and dispose lots of FreshdeskClient objects using this model.

  1. Existing HttpClient object (suitable for asp.net applications or cases where you want more control over the HttpClient)
var freshdeskClient = new FreshdeskClient(myHttpClient);

NOTE: Typically you don't want to dispose the freshdesk client in this case.

  1. Using Microsoft.Extensions.DependencyInjection
serviceCollection.AddHttpClient<IFreshdeskClient, FreshdeskClient>(client => {
  client.ConfigureFreshdeskApi(freshdeskConfiguration.Domain, freshdeskConfiguration.ApiKey); 
})

Examples

Get a single ticket, including the company information on the API response

using var freshdeskClient = new FreshdeskClient("https://mydomain.freshdesk.com", "APIKEY");
var ticket = await freshdeskClient.Tickets.ViewTicketAsync(
  ticketId: 12345, 
  includes: new TicketIncludes { Company = true }
);

API Coverage

Not all of the Freshdesk API is covered, this table illustrates the current status of coverage by this library. Pull requests to add additional features are welcome.

Coverage
Tickets :heavy_check_mark:
Ticket Fields :heavy_check_mark:
Conversations :heavy_check_mark:
Contacts :heavy_check_mark:
Agents :heavy_check_mark:
Skills :x:
Roles :x:
Groups :heavy_check_mark:
Companies :heavy_check_mark:
Canned Response Folders :x:
Discussions :x:
Solutions :heavy_check_mark:
Surveys :x:
Satisfaction Ratings :x:
Field Service Management :x:
Time Entries :x:
Email Configs :x:
Email Mailboxes :x:
Products :x:
Business Hours :x:
Scenario Automations :x:
SLA Policies :x:
Settings :x:

Development

The library utilises C#8 features and therefore VS2019 or a suitable text editor are required for making changes.

Please feel free to send pull requests or raise Github issues.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.14.1 7,359 11/24/2023
0.14.0 178 11/15/2023
0.13.6 3,059 8/22/2023
0.13.5 3,939 6/25/2023
0.13.4 3,818 2/28/2023
0.13.3 314 2/15/2023
0.13.2 588 12/15/2022
0.13.1 418 11/8/2022
0.12.1 903 11/8/2022
0.12.0 3,867 3/9/2022
0.11.2 466 2/22/2022
0.11.1 477 2/7/2022
0.11.0 1,067 1/16/2022
0.10.2 508 1/13/2022
0.10.1 282 12/27/2021
0.10.0 496 12/24/2021
0.9.0 690 10/18/2021
0.8.1 1,399 4/19/2021
0.8.0 6,756 1/22/2021
0.7.8 568 12/17/2020
0.7.7 397 12/10/2020
0.7.6 360 12/8/2020
0.7.5 554 11/12/2020
0.7.0 566 11/3/2020
0.6.0 658 10/21/2020
0.5.0 466 9/25/2020
0.4.1 1,075 5/31/2020
0.4.0 624 4/16/2020
0.3.0 462 4/15/2020
0.2.0 447 4/9/2020
0.1.0 510 4/8/2020