Freshdesk.Api
0.5.0
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
<PackageReference Include="Freshdesk.Api" Version="0.5.0" />
paket add Freshdesk.Api --version 0.5.0
#r "nuget: Freshdesk.Api, 0.5.0"
// 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
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:
- 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.
- 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.
- 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 | Versions 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. |
-
.NETStandard 2.1
- Newtonsoft.Json (>= 12.0.3)
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 | 22,562 | 11/24/2023 |
0.14.0 | 207 | 11/15/2023 |
0.13.6 | 4,373 | 8/22/2023 |
0.13.5 | 5,832 | 6/25/2023 |
0.13.4 | 4,382 | 2/28/2023 |
0.13.3 | 339 | 2/15/2023 |
0.13.2 | 632 | 12/15/2022 |
0.13.1 | 450 | 11/8/2022 |
0.12.1 | 982 | 11/8/2022 |
0.12.0 | 4,522 | 3/9/2022 |
0.11.2 | 492 | 2/22/2022 |
0.11.1 | 507 | 2/7/2022 |
0.11.0 | 1,100 | 1/16/2022 |
0.10.2 | 537 | 1/13/2022 |
0.10.1 | 307 | 12/27/2021 |
0.10.0 | 519 | 12/24/2021 |
0.9.0 | 716 | 10/18/2021 |
0.8.1 | 1,516 | 4/19/2021 |
0.8.0 | 6,806 | 1/22/2021 |
0.7.8 | 591 | 12/17/2020 |
0.7.7 | 421 | 12/10/2020 |
0.7.6 | 389 | 12/8/2020 |
0.7.5 | 581 | 11/12/2020 |
0.7.0 | 592 | 11/3/2020 |
0.6.0 | 683 | 10/21/2020 |
0.5.0 | 494 | 9/25/2020 |
0.4.1 | 1,103 | 5/31/2020 |
0.4.0 | 650 | 4/16/2020 |
0.3.0 | 489 | 4/15/2020 |
0.2.0 | 468 | 4/9/2020 |
0.1.0 | 537 | 4/8/2020 |