I've been looking at sample code from RingCentral API. I'd like to execute the following code synchronously.
I've begun familiarizing myself with 'ContinueWith'.
//From API sample
using (var rc = new RestClient("clientID", "clientSecret", "serverURL"))
{
await rc.Authorize("username", "extension", "password");
var result = await rc.Restapi(apiVersion).Account(accountId).Recording(recordingId).Get();
}
//My first attempt (I am unable to get the value of the result)
using (var rc = new RestClient("clientID", "clientSecret", "serverURL"))
{
rc.Authorize("username", "extension", "password").ContinueWith(rc.Restapi(apiVersion).Account(accountId).Recording(recordingId).Get());
}