DingSDK 0.17.6
See the version list below for details.
dotnet add package DingSDK --version 0.17.6
NuGet\Install-Package DingSDK -Version 0.17.6
<PackageReference Include="DingSDK" Version="0.17.6" />
<PackageVersion Include="DingSDK" Version="0.17.6" />
<PackageReference Include="DingSDK" />
paket add DingSDK --version 0.17.6
#r "nuget: DingSDK, 0.17.6"
#:package DingSDK@0.17.6
#addin nuget:?package=DingSDK&version=0.17.6
#tool nuget:?package=DingSDK&version=0.17.6
DingSDK
SDK Example Usage
Send a code
Send an OTP code to a user's phone number.
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
CreateAuthenticationRequest req = new CreateAuthenticationRequest() {
CustomerUuid = "c9f826e0-deca-41ec-871f-ecd6e8efeb46",
PhoneNumber = "+1234567890",
};
var res = await sdk.Otp.CreateAuthenticationAsync(req);
// handle response
Check a code
Check that a code entered by a user is valid.
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
CreateCheckRequest req = new CreateCheckRequest() {
AuthenticationUuid = "e0e7b0e9-739d-424b-922f-1c2cb48ab077",
CheckCode = "123456",
CustomerUuid = "8f1196d5-806e-4b71-9b24-5f96ec052808",
};
var res = await sdk.Otp.CheckAsync(req);
// handle response
Perform a retry
Perform a retry if a user has not received the code.
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
RetryAuthenticationRequest req = new RetryAuthenticationRequest() {
AuthenticationUuid = "a74ee547-564d-487a-91df-37fb25413a91",
CustomerUuid = "3c8b3a46-881e-4cdd-93a6-f7f238bf020a",
};
var res = await sdk.Otp.RetryAsync(req);
// handle response
Error Handling
Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type.
Error Object | Status Code | Content Type |
---|---|---|
DingSDK.Models.Errors.ErrorResponse | 400 | application/json |
DingSDK.Models.Errors.SDKException | 4xx-5xx | / |
Example
using DingSDK;
using DingSDK.Models.Components;
using System;
using DingSDK.Models.Errors;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
CreateCheckRequest req = new CreateCheckRequest() {
AuthenticationUuid = "e0e7b0e9-739d-424b-922f-1c2cb48ab077",
CheckCode = "123456",
CustomerUuid = "8f1196d5-806e-4b71-9b24-5f96ec052808",
};
try
{
var res = await sdk.Otp.CheckAsync(req);
// handle response
}
catch (Exception ex)
{
if (ex is ErrorResponse)
{
// handle exception
}
else if (ex is DingSDK.Models.Errors.SDKException)
{
// handle exception
}
}
Server Selection
Select Server by Index
You can override the default server globally by passing a server index to the serverIndex: number
optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
# | Server | Variables |
---|---|---|
0 | https://api.ding.live/v1 |
None |
Override Server URL Per-Client
The default server can also be overridden globally by passing a URL to the serverUrl: str
optional parameter when initializing the SDK client instance. For example:
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:
Name | Type | Scheme |
---|---|---|
APIKey |
apiKey | API key |
You can set the security parameters through the security
optional parameter when initializing the SDK client instance. For example:
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
CreateCheckRequest req = new CreateCheckRequest() {
AuthenticationUuid = "e0e7b0e9-739d-424b-922f-1c2cb48ab077",
CheckCode = "123456",
CustomerUuid = "8f1196d5-806e-4b71-9b24-5f96ec052808",
};
var res = await sdk.Otp.CheckAsync(req);
// handle response
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net5.0
- newtonsoft.json (>= 13.0.3)
- nodatime (>= 3.1.9)
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.20.0 | 578 | 1/9/2025 |
0.19.68 | 147 | 1/8/2025 |
0.19.67 | 186 | 1/7/2025 |
0.19.66 | 152 | 1/6/2025 |
0.19.65 | 166 | 1/5/2025 |
0.19.64 | 177 | 1/4/2025 |
0.19.63 | 150 | 1/3/2025 |
0.19.36 | 196 | 12/7/2024 |
0.19.35 | 157 | 12/6/2024 |
0.19.34 | 155 | 12/5/2024 |
0.19.33 | 151 | 12/4/2024 |
0.19.32 | 141 | 12/3/2024 |
0.19.31 | 146 | 12/2/2024 |
0.19.30 | 145 | 12/1/2024 |
0.19.29 | 150 | 11/30/2024 |
0.19.28 | 145 | 11/29/2024 |
0.19.27 | 141 | 11/28/2024 |
0.19.26 | 150 | 11/27/2024 |
0.19.25 | 147 | 11/26/2024 |
0.19.24 | 205 | 11/25/2024 |
0.19.23 | 150 | 11/24/2024 |
0.19.22 | 150 | 11/23/2024 |
0.19.21 | 144 | 11/22/2024 |
0.19.20 | 143 | 11/21/2024 |
0.19.19 | 153 | 11/20/2024 |
0.19.18 | 133 | 11/19/2024 |
0.19.17 | 141 | 11/18/2024 |
0.19.16 | 135 | 11/17/2024 |
0.19.15 | 142 | 11/16/2024 |
0.19.14 | 138 | 11/15/2024 |
0.19.13 | 146 | 11/14/2024 |
0.19.12 | 145 | 11/13/2024 |
0.19.11 | 211 | 11/11/2024 |
0.19.10 | 153 | 11/10/2024 |
0.19.9 | 151 | 11/9/2024 |
0.19.8 | 150 | 11/8/2024 |
0.19.7 | 4,888 | 11/7/2024 |
0.19.6 | 154 | 11/6/2024 |
0.19.5 | 147 | 11/5/2024 |
0.19.4 | 166 | 11/4/2024 |
0.19.3 | 157 | 11/3/2024 |
0.19.2 | 152 | 11/2/2024 |
0.19.1 | 146 | 11/1/2024 |
0.19.0 | 147 | 10/31/2024 |
0.18.0 | 158 | 10/30/2024 |
0.17.10 | 484 | 8/6/2024 |
0.17.9 | 166 | 7/26/2024 |
0.17.8 | 199 | 7/23/2024 |
0.17.7 | 155 | 7/17/2024 |
0.17.6 | 156 | 7/11/2024 |
0.17.5 | 322 | 6/22/2024 |
0.17.3 | 172 | 6/14/2024 |
0.17.2 | 274 | 6/4/2024 |
0.17.1 | 169 | 5/30/2024 |
0.17.0 | 157 | 5/29/2024 |
0.16.1 | 189 | 5/23/2024 |
0.16.0 | 142 | 5/14/2024 |
0.15.2 | 155 | 5/8/2024 |
0.15.1 | 127 | 5/3/2024 |
0.15.0 | 160 | 4/30/2024 |
0.14.1 | 320 | 4/24/2024 |
0.14.0 | 176 | 4/12/2024 |
0.13.0 | 166 | 4/2/2024 |
0.12.0 | 178 | 3/28/2024 |
0.11.4 | 184 | 3/22/2024 |
0.11.3 | 180 | 3/20/2024 |
0.11.2 | 178 | 3/16/2024 |
0.11.1 | 182 | 3/13/2024 |
0.11.0 | 179 | 3/12/2024 |
0.10.0 | 190 | 2/22/2024 |
0.9.2 | 172 | 2/17/2024 |
0.9.1 | 172 | 2/15/2024 |
0.9.0 | 179 | 2/6/2024 |
0.8.0 | 168 | 2/1/2024 |
0.7.1 | 174 | 1/19/2024 |
0.7.0 | 228 | 12/12/2023 |
0.6.2 | 191 | 12/1/2023 |
0.6.1 | 200 | 11/18/2023 |
0.6.0 | 184 | 11/16/2023 |
0.5.0 | 162 | 11/15/2023 |