Skip to content

Commit d705abd

Browse files
committed
Update REST API URL from /partner to /project
1 parent 2ab007f commit d705abd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/java/com/opentok/util/HttpClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public String createSession(Map<String, Collection<String>> params) throws Reque
6969

7070
public String getArchive(String archiveId) throws RequestException {
7171
String responseString = null;
72-
String url = this.apiUrl + "/v2/partner/" + this.apiKey + "/archive/" + archiveId;
72+
String url = this.apiUrl + "/v2/project/" + this.apiKey + "/archive/" + archiveId;
7373
Future<Response> request = this.prepareGet(url).execute();
7474

7575
try {
@@ -99,7 +99,7 @@ public String getArchive(String archiveId) throws RequestException {
9999
public String getArchives(int offset, int count) throws RequestException {
100100
String responseString = null;
101101
// TODO: maybe use a StringBuilder?
102-
String url = this.apiUrl + "/v2/partner/" + this.apiKey + "/archive";
102+
String url = this.apiUrl + "/v2/project/" + this.apiKey + "/archive";
103103
if (offset != 0 || count != 1000) {
104104
url += "?";
105105
if (offset != 0) {
@@ -138,7 +138,7 @@ public String startArchive(String sessionId, ArchiveProperties properties)
138138
String responseString = null;
139139
String requestBody = null;
140140
// TODO: maybe use a StringBuilder?
141-
String url = this.apiUrl + "/v2/partner/" + this.apiKey + "/archive";
141+
String url = this.apiUrl + "/v2/project/" + this.apiKey + "/archive";
142142

143143
JsonNodeFactory nodeFactory = JsonNodeFactory.instance;
144144
ObjectNode requestJson = nodeFactory.objectNode();
@@ -189,7 +189,7 @@ public String startArchive(String sessionId, ArchiveProperties properties)
189189
public String stopArchive(String archiveId) throws RequestException {
190190
String responseString = null;
191191
// TODO: maybe use a StringBuilder?
192-
String url = this.apiUrl + "/v2/partner/" + this.apiKey + "/archive/" + archiveId + "/stop";
192+
String url = this.apiUrl + "/v2/project/" + this.apiKey + "/archive/" + archiveId + "/stop";
193193
Future<Response> request = this.preparePost(url).execute();
194194

195195
try {
@@ -224,7 +224,7 @@ public String stopArchive(String archiveId) throws RequestException {
224224

225225
public String deleteArchive(String archiveId) throws RequestException {
226226
String responseString = null;
227-
String url = this.apiUrl + "/v2/partner/" + this.apiKey + "/archive/" + archiveId;
227+
String url = this.apiUrl + "/v2/project/" + this.apiKey + "/archive/" + archiveId;
228228
Future<Response> request = this.prepareDelete(url).execute();
229229

230230
try {

src/test/java/com/opentok/test/OpenTokTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class OpenTokTest {
6565

6666
private final String SESSION_CREATE = "/session/create";
6767
private int apiKey = 123456;
68-
private String archivePath = "/v2/partner/" + apiKey + "/archive";
68+
private String archivePath = "/v2/project/" + apiKey + "/archive";
6969
private String apiSecret = "1234567890abcdef1234567890abcdef1234567890";
7070
private String apiUrl = "http://localhost:8080";
7171
private OpenTok sdk;
@@ -92,7 +92,7 @@ public void setUp() throws OpenTokException {
9292
// TODO: figure out when to turn mocking off based on this
9393
apiKey = anApiKey;
9494
apiSecret = anApiSecret;
95-
archivePath = "/v2/partner/" + apiKey + "/archive";
95+
archivePath = "/v2/project/" + apiKey + "/archive";
9696
}
9797
sdk = new OpenTok.Builder(apiKey, apiSecret).apiUrl(apiUrl).build();
9898
}

0 commit comments

Comments
 (0)