Search in sources :

Example 1 with VodClient

use of com.tencentcloudapi.vod.v20180717.VodClient in project cloud-sdk by mizhousoft.

the class QCloudVODServiceImpl method init.

public void init(VodProfile profile) throws CloudSDKException {
    VodProfileValidator.validate(profile);
    Credential cred = new Credential(profile.getAccessKey(), profile.getSecretKey());
    HttpProfile httpProfile = new HttpProfile();
    httpProfile.setEndpoint(profile.getEndpoint());
    ClientProfile clientProfile = new ClientProfile();
    clientProfile.setHttpProfile(httpProfile);
    VodClient client = new VodClient(cred, profile.getRegion(), clientProfile);
    this.vodClient = client;
    LOG.info("Init vod client successfully.");
}
Also used : VodClient(com.tencentcloudapi.vod.v20180717.VodClient) Credential(com.tencentcloudapi.common.Credential) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile)

Example 2 with VodClient

use of com.tencentcloudapi.vod.v20180717.VodClient in project Ant-Live by PinTeh.

the class TencentConfig method getVodClient.

@Bean
public VodClient getVodClient() {
    Credential cred = new Credential(iii, kkk);
    HttpProfile httpProfile = new HttpProfile();
    httpProfile.setEndpoint("vod.tencentcloudapi.com");
    ClientProfile clientProfile = new ClientProfile();
    clientProfile.setHttpProfile(httpProfile);
    // Region公共参数,本接口不需要传递此参数。
    return new VodClient(cred, "ap-chongqing", clientProfile);
}
Also used : VodClient(com.tencentcloudapi.vod.v20180717.VodClient) Credential(com.tencentcloudapi.common.Credential) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) Bean(org.springframework.context.annotation.Bean)

Aggregations

Credential (com.tencentcloudapi.common.Credential)2 ClientProfile (com.tencentcloudapi.common.profile.ClientProfile)2 HttpProfile (com.tencentcloudapi.common.profile.HttpProfile)2 VodClient (com.tencentcloudapi.vod.v20180717.VodClient)2 Bean (org.springframework.context.annotation.Bean)1