This is a simple wrapper around the RingCentral C# SDK to make common API calls easier to access. The RingCentral SDK client object is available via the simple client and can be introduced via a dependency injection.
The code is a very early proof of concept.
Via NuGet:
PM> Install-Package RingCentral
PM> Install-Package RingCentralSimple
using RingCentral;
using RingCentralSimple;
This can be done simply using the SendMessage()
method which returns a RingCentral.SDK.Http.Response
object. This assumes that the accountId
and extensionId
are the default ids for the authorized user.
// Instantiate SDK
var sdk = new RingCentral.SDK.SDK("appKey", "appSecret", "serverUrl", "appName", "appVersion");
var rc = new RingCentralSimple.Client(sdk);
// Authorize User using OAuth Password Grant
rc.Sdk.GetPlatform().Authorize("username", "extension", "password", true);
// SendMessage takes the following parameters: ("fromNumber", "toNumber", "message")
var response = rc.SendMessage("+15551112222", "+15553334444", "RingCentral SMS via C#");
The official RingCentral C# SDK is available via the Sdk
property.
var rc = new RingCentralSimple.Client("appKey", "appSecret", "serverUrl");
var rcsdk = rc.Sdk;
RingCentral Simple SDK for C# is available under an MIT-style license. See the LICENSE.txt
file for details.
RingCentral Simple SDK for C# © 2015-2016 by John Wang