forked from ringcentral/ringcentral-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCallLogTest.java
More file actions
32 lines (22 loc) · 929 Bytes
/
CallLogTest.java
File metadata and controls
32 lines (22 loc) · 929 Bytes
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
package com.ringcentral;
import com.ringcentral.definitions.CallLogResponse;
import com.ringcentral.definitions.ReadUserCallLogParameters;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertNotNull;
public class CallLogTest {
@Test
public void listCallLogs() throws IOException, RestException {
RestClient rc = new RestClient(
System.getenv("RINGCENTRAL_CLIENT_ID"),
System.getenv("RINGCENTRAL_CLIENT_SECRET"),
System.getenv("RINGCENTRAL_SERVER_URL")
);
rc.authorize(System.getenv("RINGCENTRAL_JWT_TOKEN"));
ReadUserCallLogParameters getParameters = new ReadUserCallLogParameters();
getParameters.type = new String[]{"Voice"};
CallLogResponse response = rc.restapi().account().extension().callLog().list(getParameters);
assertNotNull(response.records);
rc.revoke();
}
}