|
|
@@ -46,7 +46,7 @@ public class OssConsoleClient {
|
|
|
.addPart("accessKeyId", accessKeyId)
|
|
|
.addPart("accessKeySecret", accessKeySecret);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/key/auth", endpoint);
|
|
|
+ String api = String.format("%s/api/admin/oss/key/auth", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
.header("content-type", "multipart/form-data; boundary=" + publisher.getBoundary())
|
|
|
@@ -75,7 +75,7 @@ public class OssConsoleClient {
|
|
|
// oss-store 相关接口
|
|
|
// ****************************************************************************************************************
|
|
|
public ServerInfo getUploadStore(int channelId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/upload/store?channelId=%s", endpoint, channelId);
|
|
|
+ String api = String.format("%s/api/admin/oss/upload/store?channelId=%s", endpoint, channelId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -100,7 +100,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public Integer getChannelScope(int channelId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/channel/scope?channelId=%s", endpoint, channelId);
|
|
|
+ String api = String.format("%s/api/admin/oss/channel/scope?channelId=%s", endpoint, channelId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -130,7 +130,7 @@ public class OssConsoleClient {
|
|
|
formData.put("scope", scope+"");
|
|
|
formData.put("objectId", objectId);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/scope", endpoint);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/scope", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -171,7 +171,7 @@ public class OssConsoleClient {
|
|
|
formData.put("channelId", channelId+"");
|
|
|
formData.put("objectId", objectId);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/delete/id", endpoint);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/delete/id", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -198,7 +198,7 @@ public class OssConsoleClient {
|
|
|
Map<String, String> formData = new HashMap<>();
|
|
|
formData.put("objectUrl", objectUrl);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/delete/url", endpoint);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/delete/url", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -222,7 +222,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public ObjectInfo getObjectInfo(int channelId, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/info?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/info?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -247,7 +247,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public String getSignedUrl(int channelId, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/url?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/url?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -272,7 +272,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public VideoInfo getVideoInfo(int channelId, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/video/info?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/video/info?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -297,7 +297,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public ImageInfo getImageInfo(int channelId, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/image/info?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/image/info?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -327,7 +327,7 @@ public class OssConsoleClient {
|
|
|
formData.put("channelId", ""+channelId);
|
|
|
formData.put("objectId", objectId);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/image/webp", endpoint);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/image/webp", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -353,7 +353,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public AudioInfo getAudioInfo(int channelId, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/audio/info/?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/audio/info/?channelId=%s&objectId=%s", endpoint, channelId, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -381,12 +381,12 @@ public class OssConsoleClient {
|
|
|
// 音视频转码相关接口
|
|
|
// ****************************************************************************************************************
|
|
|
public void convertAudio(String audioFileId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/convert/audio/%s", endpoint, audioFileId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/convert/audio/%s", endpoint, audioFileId);
|
|
|
convert(api);
|
|
|
}
|
|
|
|
|
|
public void convertVideo(String videoFileId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/convert/video/%s", endpoint, videoFileId);
|
|
|
+ String api = String.format("%s/api/admin/oss/object/convert/video/%s", endpoint, videoFileId);
|
|
|
convert(api);
|
|
|
}
|
|
|
|