
com.tencent.ads.container.ChannelsApiContainer Maven / Gradle / Ivy
/*
* Marketing API
* Marketing API
*
* OpenAPI spec version: 1.3
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.tencent.ads.container;
import com.google.inject.Inject;
import com.tencent.ads.ApiContainer;
import com.tencent.ads.ApiException;
import com.tencent.ads.anno.*;
import com.tencent.ads.api.ChannelsApi;
import com.tencent.ads.exception.TencentAdsResponseException;
import com.tencent.ads.model.ChannelsAddRequest;
import com.tencent.ads.model.ChannelsAddResponse;
import com.tencent.ads.model.ChannelsAddResponseData;
import com.tencent.ads.model.ChannelsGetRequest;
import com.tencent.ads.model.ChannelsGetResponse;
import com.tencent.ads.model.ChannelsGetResponseData;
import com.tencent.ads.model.ChannelsUpdateRequest;
import com.tencent.ads.model.ChannelsUpdateResponse;
import com.tencent.ads.model.ChannelsUpdateResponseData;
public class ChannelsApiContainer extends ApiContainer {
@Inject ChannelsApi api;
/**
* 创建广告
*
* @param data (required)
* @return ChannelsAddResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public ChannelsAddResponseData channelsAdd(ChannelsAddRequest data)
throws ApiException, TencentAdsResponseException {
ChannelsAddResponse resp = api.channelsAdd(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
/**
* 拉取广告列表
*
* @param data (required)
* @return ChannelsGetResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public ChannelsGetResponseData channelsGet(ChannelsGetRequest data)
throws ApiException, TencentAdsResponseException {
ChannelsGetResponse resp = api.channelsGet(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
/**
* 更新广告
*
* @param data (required)
* @return ChannelsUpdateResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public ChannelsUpdateResponseData channelsUpdate(ChannelsUpdateRequest data)
throws ApiException, TencentAdsResponseException {
ChannelsUpdateResponse resp = api.channelsUpdate(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy