Search in sources :

Example 11 with HttpProfile

use of com.tencentcloudapi.common.profile.HttpProfile in project tencentcloud-sdk-java by TencentCloud.

the class SubmitOneByOneClassTask method main.

public static void main(String[] args) {
    try {
        Credential cred = new Credential("", "");
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setReqMethod("POST");
        httpProfile.setConnTimeout(60);
        httpProfile.setEndpoint("tci.ap-beijing.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setUnsignedPayload(true);
        clientProfile.setHttpProfile(httpProfile);
        TciClient client = new TciClient(cred, "", clientProfile);
        SubmitOneByOneClassTaskRequest req = new SubmitOneByOneClassTaskRequest();
        req.setFileContent("https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4");
        req.setFileType("vod_url");
        long lang = 0;
        req.setLang(lang);
        req.setLibrarySet(new String[] { "library_15603955264181591716" });
        req.setVocabLibNameList(new String[] { "testlib2" });
        long EncodeType = 1;
        req.setVoiceEncodeType(EncodeType);
        long FileType = 10;
        req.setVoiceFileType(FileType);
        SubmitOneByOneClassTaskResponse res = client.SubmitOneByOneClassTask(req);
        System.out.println(SubmitOneByOneClassTaskResponse.toJsonString(res));
        System.out.println(res.getRequestId());
    } catch (TencentCloudSDKException e) {
        e.printStackTrace();
    }
}
Also used : SubmitOneByOneClassTaskRequest(com.tencentcloudapi.tci.v20190318.models.SubmitOneByOneClassTaskRequest) SubmitOneByOneClassTaskResponse(com.tencentcloudapi.tci.v20190318.models.SubmitOneByOneClassTaskResponse) Credential(com.tencentcloudapi.common.Credential) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) TciClient(com.tencentcloudapi.tci.v20190318.TciClient)

Example 12 with HttpProfile

use of com.tencentcloudapi.common.profile.HttpProfile in project tencentcloud-sdk-java by TencentCloud.

the class SubmitOpenClassTask method main.

public static void main(String[] args) {
    try {
        Credential cred = new Credential("", "");
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setReqMethod("POST");
        httpProfile.setConnTimeout(60);
        httpProfile.setEndpoint("tci.ap-beijing.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setUnsignedPayload(true);
        clientProfile.setHttpProfile(httpProfile);
        TciClient client = new TciClient(cred, "", clientProfile);
        SubmitOpenClassTaskRequest req = new SubmitOpenClassTaskRequest();
        req.setFileContent("https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4");
        req.setFileType("vod_url");
        req.setLibrarySet(new String[] { "library_15603955264181591716" });
        SubmitOpenClassTaskResponse res = client.SubmitOpenClassTask(req);
        System.out.println(SubmitOpenClassTaskResponse.toJsonString(res));
        System.out.println(res.getRequestId());
    } catch (TencentCloudSDKException e) {
        e.printStackTrace();
    }
}
Also used : Credential(com.tencentcloudapi.common.Credential) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) SubmitOpenClassTaskRequest(com.tencentcloudapi.tci.v20190318.models.SubmitOpenClassTaskRequest) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) TciClient(com.tencentcloudapi.tci.v20190318.TciClient) SubmitOpenClassTaskResponse(com.tencentcloudapi.tci.v20190318.models.SubmitOpenClassTaskResponse)

Example 13 with HttpProfile

use of com.tencentcloudapi.common.profile.HttpProfile in project tencentcloud-sdk-java by TencentCloud.

the class SubmitPartialBodyClassTask method main.

public static void main(String[] args) {
    try {
        Credential cred = new Credential("", "");
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setReqMethod("POST");
        httpProfile.setConnTimeout(60);
        httpProfile.setEndpoint("tci.ap-beijing.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setUnsignedPayload(true);
        clientProfile.setHttpProfile(httpProfile);
        TciClient client = new TciClient(cred, "", clientProfile);
        SubmitPartialBodyClassTaskRequest req = new SubmitPartialBodyClassTaskRequest();
        req.setFileContent("https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4");
        req.setFileType("vod_url");
        long lang = 0;
        req.setLang(lang);
        req.setLibrarySet(new String[] { "library_15603955264181591716" });
        req.setVocabLibNameList(new String[] { "testlib2" });
        long EncodeType = 1;
        req.setVoiceEncodeType(EncodeType);
        long FileType = 10;
        req.setVoiceFileType(FileType);
        SubmitPartialBodyClassTaskResponse res = client.SubmitPartialBodyClassTask(req);
        System.out.println(SubmitPartialBodyClassTaskResponse.toJsonString(res));
        System.out.println(res.getRequestId());
    } catch (TencentCloudSDKException e) {
        e.printStackTrace();
    }
}
Also used : Credential(com.tencentcloudapi.common.Credential) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) SubmitPartialBodyClassTaskRequest(com.tencentcloudapi.tci.v20190318.models.SubmitPartialBodyClassTaskRequest) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) SubmitPartialBodyClassTaskResponse(com.tencentcloudapi.tci.v20190318.models.SubmitPartialBodyClassTaskResponse) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) TciClient(com.tencentcloudapi.tci.v20190318.TciClient)

Example 14 with HttpProfile

use of com.tencentcloudapi.common.profile.HttpProfile in project tencentcloud-sdk-java by TencentCloud.

the class SubmitTraditionalClassTask method main.

public static void main(String[] args) {
    try {
        Credential cred = new Credential("", "");
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setReqMethod("POST");
        httpProfile.setConnTimeout(60);
        httpProfile.setEndpoint("tci.ap-beijing.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setUnsignedPayload(true);
        clientProfile.setHttpProfile(httpProfile);
        TciClient client = new TciClient(cred, "", clientProfile);
        SubmitTraditionalClassTaskRequest req = new SubmitTraditionalClassTaskRequest();
        req.setFileContent("https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4");
        req.setFileType("vod_url");
        req.setLibrarySet(new String[] { "library_15603955264181591716" });
        SubmitTraditionalClassTaskResponse res = client.SubmitTraditionalClassTask(req);
        System.out.println(SubmitTraditionalClassTaskResponse.toJsonString(res));
        System.out.println(res.getRequestId());
    } catch (TencentCloudSDKException e) {
        e.printStackTrace();
    }
}
Also used : Credential(com.tencentcloudapi.common.Credential) TencentCloudSDKException(com.tencentcloudapi.common.exception.TencentCloudSDKException) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) SubmitTraditionalClassTaskRequest(com.tencentcloudapi.tci.v20190318.models.SubmitTraditionalClassTaskRequest) TciClient(com.tencentcloudapi.tci.v20190318.TciClient) SubmitTraditionalClassTaskResponse(com.tencentcloudapi.tci.v20190318.models.SubmitTraditionalClassTaskResponse)

Example 15 with HttpProfile

use of com.tencentcloudapi.common.profile.HttpProfile in project tencentcloud-sdk-java by TencentCloud.

the class UploadDataFile method main.

public static void main(String[] args) {
    try {
        Credential cred = new Credential("secretId", "secretKey");
        HttpProfile httpProfile = new HttpProfile();
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setHttpProfile(httpProfile);
        CrClient crclient = new CrClient(cred, "ap-guangzhou", clientProfile);
        UploadDataFileRequest udfreq = new UploadDataFileRequest();
        udfreq.setModule("Data");
        udfreq.setOperation("Upload");
        udfreq.setFileName("中文文件名unicodeFileName.xlsx");
        udfreq.setFile(Files.readAllBytes(Paths.get("E:\\data.xlsx")));
        UploadDataFileResponse udfresp = crclient.UploadDataFile(udfreq);
        System.out.println(UploadDataFileResponse.toJsonString(udfresp));
    } catch (Exception e) {
        System.out.println(e);
    }
}
Also used : Credential(com.tencentcloudapi.common.Credential) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) CrClient(com.tencentcloudapi.cr.v20180321.CrClient) UploadDataFileResponse(com.tencentcloudapi.cr.v20180321.models.UploadDataFileResponse) UploadDataFileRequest(com.tencentcloudapi.cr.v20180321.models.UploadDataFileRequest)

Aggregations

HttpProfile (com.tencentcloudapi.common.profile.HttpProfile)41 ClientProfile (com.tencentcloudapi.common.profile.ClientProfile)40 Credential (com.tencentcloudapi.common.Credential)39 TencentCloudSDKException (com.tencentcloudapi.common.exception.TencentCloudSDKException)26 CvmClient (com.tencentcloudapi.cvm.v20170312.CvmClient)8 DescribeInstancesRequest (com.tencentcloudapi.cvm.v20170312.models.DescribeInstancesRequest)8 DescribeInstancesResponse (com.tencentcloudapi.cvm.v20170312.models.DescribeInstancesResponse)8 TciClient (com.tencentcloudapi.tci.v20190318.TciClient)6 SoeClient (com.tencentcloudapi.soe.v20180724.SoeClient)5 Test (org.junit.Test)5 OcrClient (com.tencentcloudapi.ocr.v20181119.OcrClient)3 HashMap (java.util.HashMap)3 Bean (org.springframework.context.annotation.Bean)3 CmqConfig (com.qcloud.cmq.entity.CmqConfig)2 CommonClient (com.tencentcloudapi.common.CommonClient)2 Filter (com.tencentcloudapi.cvm.v20170312.models.Filter)2 EccClient (com.tencentcloudapi.ecc.v20181213.EccClient)2 SmsClient (com.tencentcloudapi.sms.v20190711.SmsClient)2 SendSmsRequest (com.tencentcloudapi.sms.v20190711.models.SendSmsRequest)2 SendSmsResponse (com.tencentcloudapi.sms.v20190711.models.SendSmsResponse)2