
com.tencent.ads.container.AdsApiContainer 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.AdsApi;
import com.tencent.ads.exception.TencentAdsResponseException;
import com.tencent.ads.model.AdsAddRequest;
import com.tencent.ads.model.AdsAddResponse;
import com.tencent.ads.model.AdsAddResponseData;
import com.tencent.ads.model.AdsDeleteRequest;
import com.tencent.ads.model.AdsDeleteResponse;
import com.tencent.ads.model.AdsDeleteResponseData;
import com.tencent.ads.model.AdsGetResponse;
import com.tencent.ads.model.AdsGetResponseData;
import com.tencent.ads.model.AdsUpdateConfiguredStatusRequest;
import com.tencent.ads.model.AdsUpdateConfiguredStatusResponse;
import com.tencent.ads.model.AdsUpdateConfiguredStatusResponseData;
import com.tencent.ads.model.AdsUpdateRequest;
import com.tencent.ads.model.AdsUpdateResponse;
import com.tencent.ads.model.AdsUpdateResponseData;
import com.tencent.ads.model.FilteringStruct;
import java.util.List;
public class AdsApiContainer extends ApiContainer {
@Inject AdsApi api;
/**
* 创建广告
*
* @param data (required)
* @return AdsAddResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public AdsAddResponseData adsAdd(AdsAddRequest data)
throws ApiException, TencentAdsResponseException {
AdsAddResponse resp = api.adsAdd(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
/**
* 删除广告
*
* @param data (required)
* @return AdsDeleteResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public AdsDeleteResponseData adsDelete(AdsDeleteRequest data)
throws ApiException, TencentAdsResponseException {
AdsDeleteResponse resp = api.adsDelete(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
/**
* 获取广告
*
* @param accountId (required)
* @param filtering (optional)
* @param page (optional)
* @param pageSize (optional)
* @param isDeleted (optional)
* @param fields 返回参数的字段列表 (optional)
* @return AdsGetResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public AdsGetResponseData adsGet(
Long accountId,
List filtering,
Long page,
Long pageSize,
Boolean isDeleted,
List fields)
throws ApiException, TencentAdsResponseException {
AdsGetResponse resp = api.adsGet(accountId, filtering, page, pageSize, isDeleted, fields);
handleResponse(gson.toJson(resp));
return resp.getData();
}
/**
* 更新广告
*
* @param data (required)
* @return AdsUpdateResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public AdsUpdateResponseData adsUpdate(AdsUpdateRequest data)
throws ApiException, TencentAdsResponseException {
AdsUpdateResponse resp = api.adsUpdate(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
/**
* 更新广告状态
*
* @param data (required)
* @return AdsUpdateConfiguredStatusResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public AdsUpdateConfiguredStatusResponseData adsUpdateConfiguredStatus(
AdsUpdateConfiguredStatusRequest data) throws ApiException, TencentAdsResponseException {
AdsUpdateConfiguredStatusResponse resp = api.adsUpdateConfiguredStatus(data);
handleResponse(gson.toJson(resp));
return resp.getData();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy