forked from ringcentral/RingCentral.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MeetingRecordingTest.cs
39 lines (37 loc) · 1.37 KB
/
MeetingRecordingTest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Net;
using Xunit;
namespace RingCentral.Tests
{
public class MeetingRecordingTest
{
[Fact]
public async void ListMeetingRecordings()
{
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")
);
try
{
var r = await rc.Restapi().Account().MeetingRecordings().Get();
Assert.NotNull(r);
var str = await rc.Get<string>(rc.Restapi().Account().MeetingRecordings().Path());
Assert.NotNull(str);
}
catch (RestException re)
{
// todo: https://jira.ringcentral.com/browse/PLA-49859
Assert.Equal(HttpStatusCode.Forbidden, re.httpResponseMessage.StatusCode);
}
}
}
}
}