Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (27 sloc) 1001 Bytes
using System;
using System.Linq;
using Xunit;
namespace RingCentral.Tests
{
public class DirectoryTest
{
[Fact]
public async void FetchDirectory()
{
using (var rc = new RestClient(
Environment.GetEnvironmentVariable("RINGCENTRAL_CLIENT_ID"),
Environment.GetEnvironmentVariable("RINGCENTRAL_CLIENT_SECRET"),
Environment.GetEnvironmentVariable("RINGCENTRAL_SERVER_URL")
))
{
await rc.Authorize(
Environment.GetEnvironmentVariable("RINGCENTRAL_USERNAME"),
Environment.GetEnvironmentVariable("RINGCENTRAL_EXTENSION"),
Environment.GetEnvironmentVariable("RINGCENTRAL_PASSWORD")
);
var directoryResource = await rc.Restapi().Account().Directory().Entries().List();
var sites = directoryResource.records.Select(r => r.site).ToArray();
}
}
}
}
You can’t perform that action at this time.