|
@@ -1,21 +1,21 @@
|
|
package com.miaxis.test;
|
|
package com.miaxis.test;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.miaxis.ZzjsApplication;
|
|
import com.miaxis.ZzjsApplication;
|
|
import com.miaxis.common.utils.VodSignature;
|
|
import com.miaxis.common.utils.VodSignature;
|
|
-import com.miaxis.feign.dto.WxSend;
|
|
|
|
-import com.miaxis.feign.service.IWxSendService;
|
|
|
|
-import com.miaxis.wx.service.IWxXcxMessageService;
|
|
|
|
|
|
+import com.tencentcloudapi.common.Credential;
|
|
|
|
+import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
|
|
|
+import com.tencentcloudapi.common.profile.ClientProfile;
|
|
|
|
+import com.tencentcloudapi.common.profile.HttpProfile;
|
|
|
|
+import com.tencentcloudapi.vod.v20180717.VodClient;
|
|
|
|
+import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosRequest;
|
|
|
|
+import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosResponse;
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.junit.runner.RunWith;
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
-import java.util.Date;
|
|
|
|
|
|
|
|
@SpringBootTest(classes = ZzjsApplication.class)
|
|
@SpringBootTest(classes = ZzjsApplication.class)
|
|
@RunWith(SpringRunner.class)
|
|
@RunWith(SpringRunner.class)
|
|
@@ -24,6 +24,14 @@ public class VodTest {
|
|
@Resource
|
|
@Resource
|
|
VodSignature vodSignature;
|
|
VodSignature vodSignature;
|
|
|
|
|
|
|
|
+ @Value("${cos.secretId}")
|
|
|
|
+ private String secretId;
|
|
|
|
+ @Value("${cos.secretKey}")
|
|
|
|
+ private String secretKey;
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ VodClient vodClient;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
*/
|
|
*/
|
|
@Test
|
|
@Test
|
|
@@ -34,6 +42,24 @@ public class VodTest {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void get1() throws Exception {
|
|
|
|
+ try{
|
|
|
|
+
|
|
|
|
+ DescribeMediaInfosRequest req = new DescribeMediaInfosRequest();
|
|
|
|
+ String[] fileIds1 = {"3701925920237204036"};
|
|
|
|
+ String[] filter1 = {"basicInfo"};
|
|
|
|
+ req.setFileIds(fileIds1);
|
|
|
|
+ req.setFilters(filter1);
|
|
|
|
+ DescribeMediaInfosResponse resp = vodClient.DescribeMediaInfos(req);
|
|
|
|
+
|
|
|
|
+ System.out.println(DescribeMediaInfosResponse.toJsonString(resp));
|
|
|
|
+ } catch (TencentCloudSDKException e) {
|
|
|
|
+ System.out.println(e.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|