RingCentral.Net
6.2.4
See the version list below for details.
dotnet add package RingCentral.Net --version 6.2.4
NuGet\Install-Package RingCentral.Net -Version 6.2.4
<PackageReference Include="RingCentral.Net" Version="6.2.4" />
paket add RingCentral.Net --version 6.2.4
#r "nuget: RingCentral.Net, 6.2.4"
// Install RingCentral.Net as a Cake Addin #addin nuget:?package=RingCentral.Net&version=6.2.4 // Install RingCentral.Net as a Cake Tool #tool nuget:?package=RingCentral.Net&version=6.2.4
RingCentral.Net
Getting help and support
If you are having difficulty using this SDK, or working with the RingCentral API, please visit our developer community forums for help and to get quick answers to your questions. If you wish to contact the RingCentral Developer Support team directly, please submit a help ticket from our developer website.
Additional resources
- RingCentral API Reference - an interactive reference for the RingCentral API that allows developers to make API calls with no code.
- Document - an interactive reference for the SDK code documentation.
Installation
Packages are available on NuGet. You can install them just like you install any other NuGet packages.
This package is compatible with .NET Standard 2.0, which means, it is compatible with all modern .NET platforms including .NET Core, .NET Framework, and Mono.
Extensions
Since version 5.0.0, this project has been changed to an extension-based architecture.
- RingCentral.Net provides core features.
You need to install extensions if you need extra features:
- RingCentral.Net.WebSocket provides you with WebSocket support. You can subscribe to events.
- RingCentral.Net.AuthorizeUri provides utility methods to build URI for OAuth authorization purposes.
- RingCentral.Net.AutoRefresh auto-refreshes your token.
- RingCentral.Net.Debug prints all HTTP traffic to the console.
- RingCentral.Net.Events provides you with events about HTTP requests.
- RingCentral.Net.RateLimit automatically handles the rate limit for you.
- RingCentral.Net.Retry allows you to retry a REST request if there is
RestException
.
Code samples
You can find sample code for all the endpoints.
There is also lots of useful code for your reference in our test cases.
Logging
The SDK takes advantage of System .Diagnostics.Trace](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.trace?view=net-6.0) to provide logs.
To enable logging, you need to either add #define TRACE
to your source or specify the option /d:TRACE
when
compiling.
To specify an output channel, you need to specify a listener:
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
Code about will print logs to the console. For more detail please refer to Trace.Listeners Property.
C# using
statement
Please note that if you use the using
statement to initialize a RestClient
:
using (var rc = new RestClient("clientID", "clientSecret", "serverURL"))
{
await rc.Authorize("username", "extension", "password");
...
}
rc.Dispose()
will be automatically invoked after the code block above and the token will be revoked.
If you want to retain the token, do NOT use using
and do not rc.Revoke()
.
Binary content downloading
Some sample code for binary content downloading may not work.
Because RingCentral is gradually migrating binary content to CDN such as media.ringcentral.com
.
For example, to download the attachment of a fax:
// `message` is the fax message object
var content = await rc.Get<byte[]>(message.attachments[0].uri);
The following does NOT work:
// `message` is the fax message object
var content = await rc.Restapi().Account().Extension().MessageStore(message.id).Content(message.attachments[0].id).Get();
Rule of thumb
But not all binary content has been migrated to CDN. If the resource to download provides you with a CDN URI, use that CDN URI. If there is no CDN URI provided, construct the URI as the sample code shows.
How to access headers
By default, the SDK doesn't return headers:
var extInfo = await rc.Restapi().Account("~").Extension("~").Get();
If you need headers:
var httpResponseMessage = await rc.Get(rc.Restapi().Account("~").Extension("~").Path(true));
var headers = httpResponseMessage.Headers;
var responseBodyStr = await httpResponseMessage.Content.ReadAsStringAsync();
var extInfo = JsonConvert.DeserializeObject<GetExtensionInfoResponse>(responseBodyStr);
Release Notes
6.0.0
We have renamed all "glip" to "team-messaging". For example:
rc.Restapi().Glip().Chats().List();
Becomes:
rc.TeamMessaging().Chats().List();
For maintainers
Release
Update the version number in RingCentral.Net/RestClient.cs
.
Update version number in <ProjectName>/<ProjectName>.csproj
cd <ProjectName>
dotnet pack
Todo
- Add batch get to auto-generated sample code
- Add icons to NuGet packages
Development Notes
I tried to migrate from Newtonsoft.Json to System.Text.Json, but it's not easy. Especially System.Text.Json doesn't automatically convert string to number. It doesn't even automatically convert double to int64. Considering the complexity and benefits of the migration, I decided to keep using Newtonsoft.Json for now. Ref: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft
Code coverage
Install the following globally if you haven't done so:
dotnet tool install -g dotnet-reportgenerator-globaltool
Collect code coverage data
dotnet test -settings RingCentral.Tests/coverlet.runsettings.xml
The result is located in RingCentral.Tests/TestResults/
Generate report
~/.dotnet/tools/reportgenerator -reports:"RingCentral.Tests/TestResults/239bdb87–151b-42ac-acec-1f604f8c02c5/coverage.cobertura.xml" -targetdir:RingCentral.Tests/CoverageReport -reporttypes:Html
Open RingCentral.Tests/CoverageReport/index.html in a browser.
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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. 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.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on RingCentral.Net:
Package | Downloads |
---|---|
LagoVista.UserAdmin
User, Organization and Location Management Models and API for LagoVista IoT, Devices and Home Automation Framework |
|
RingCentral.Net.AuthorizeUri
Authorize URI extension for RingCentral.Net |
|
RingCentral.Net.Retry
Retry extension for RingCentral.Net |
|
RingCentral.Net.PubnubPCL
PubNub extension for RingCentral.NET |
|
RingCentral.Net.WebSocket
WebSocket extension for RingCentral.NET, |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
6.2.6 | 209 | 11/12/2024 |
6.2.5 | 160 | 11/6/2024 |
6.2.4 | 1,159 | 10/10/2024 |
6.2.3 | 316 | 10/9/2024 |
6.2.2 | 1,125 | 9/18/2024 |
6.2.1 | 1,384 | 8/28/2024 |
6.2.0 | 5,089 | 7/1/2024 |
6.1.6 | 2,735 | 6/17/2024 |
6.1.5 | 7,263 | 4/22/2024 |
6.1.4 | 981 | 4/2/2024 |
6.1.3 | 6,286 | 3/5/2024 |
6.1.2 | 1,958 | 2/12/2024 |
6.1.1 | 14,291 | 1/3/2024 |
6.1.0 | 6,205 | 12/10/2023 |
6.0.2 | 22,593 | 9/6/2023 |
6.0.1 | 2,162 | 8/21/2023 |
6.0.0 | 33,387 | 5/16/2023 |
6.0.0-beta4 | 937 | 4/11/2023 |
6.0.0-beta3 | 732 | 3/28/2023 |
6.0.0-beta2 | 895 | 1/5/2023 |
5.18.0 | 219,789 | 9/29/2022 |
5.17.0 | 31,218 | 6/1/2022 |
5.16.0 | 23,502 | 3/17/2022 |
5.15.0 | 6,737 | 3/16/2022 |
5.14.0 | 1,355 | 3/2/2022 |
5.13.0 | 32,916 | 2/23/2022 |
5.12.0 | 1,848 | 2/10/2022 |
5.11.0 | 18,413 | 1/27/2022 |
5.10.0 | 254,229 | 1/7/2022 |
5.9.0 | 36,537 | 11/17/2021 |
5.8.0 | 1,844 | 11/4/2021 |
5.7.0 | 41,000 | 9/30/2021 |
5.6.1 | 1,542 | 9/19/2021 |
5.6.0 | 1,531 | 9/8/2021 |
5.5.0 | 2,348 | 8/9/2021 |
5.4.0 | 2,471 | 7/30/2021 |
5.3.0 | 4,444 | 6/10/2021 |
5.2.0 | 11,435 | 4/29/2021 |
5.1.0 | 4,933 | 3/17/2021 |
5.0.0 | 3,019 | 3/3/2021 |
5.0.0-beta4 | 1,027 | 1/21/2021 |
5.0.0-beta3 | 956 | 1/11/2021 |
5.0.0-beta2 | 1,007 | 11/13/2020 |
5.0.0-beta1 | 1,922 | 10/27/2020 |
4.1.0 | 177,511 | 8/14/2020 |
4.0.1 | 2,223 | 7/31/2020 |
4.0.0 | 1,440 | 7/9/2020 |
4.0.0-beta4 | 12,954 | 4/27/2020 |
4.0.0-beta3 | 963 | 4/26/2020 |
4.0.0-beta2 | 975 | 4/25/2020 |
4.0.0-beta1 | 989 | 4/19/2020 |
3.2.0 | 44,559 | 3/23/2020 |
3.1.0-beta | 1,030 | 2/25/2020 |
3.0.0 | 17,506 | 2/18/2020 |
2.4.0 | 2,060 | 1/27/2020 |
2.3.1 | 1,217 | 1/27/2020 |
2.3.0 | 2,963 | 12/31/2019 |
2.2.0 | 1,302 | 12/27/2019 |
2.1.0 | 69,656 | 10/10/2019 |
2.0.2 | 2,241 | 9/12/2019 |
2.0.1 | 2,727 | 9/3/2019 |
2.0.0 | 1,226 | 9/3/2019 |
2.0.0-beta2 | 2,621 | 7/17/2019 |
2.0.0-beta1 | 1,132 | 7/16/2019 |
1.2.1 | 8,836 | 6/18/2019 |
1.2.0 | 1,399 | 5/12/2019 |
1.1.1 | 1,487 | 4/3/2019 |
1.1.0 | 1,553 | 3/31/2019 |
1.0.1 | 1,307 | 3/30/2019 |
1.0.0 | 1,355 | 3/25/2019 |
0.6.3 | 1,326 | 3/13/2019 |
0.6.2 | 1,310 | 3/7/2019 |
0.6.1 | 1,294 | 2/23/2019 |
0.6.0 | 1,737 | 2/21/2019 |
0.4.0 | 1,600 | 1/16/2019 |
0.3.0 | 1,624 | 1/15/2019 |
0.2.0 | 1,596 | 1/15/2019 |
0.1.0 | 1,713 | 1/14/2019 |