All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tencent.ads.container.LocalApiContainer 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.LocalApi;
import com.tencent.ads.exception.TencentAdsResponseException;
import com.tencent.ads.model.LocalAddRequest;
import com.tencent.ads.model.LocalAddResponse;
import com.tencent.ads.model.LocalAddResponseData;
import com.tencent.ads.model.LocalGetRequest;
import com.tencent.ads.model.LocalGetResponse;
import com.tencent.ads.model.LocalGetResponseData;
import com.tencent.ads.model.LocalUpdateRequest;
import com.tencent.ads.model.LocalUpdateResponse;
import com.tencent.ads.model.LocalUpdateResponseData;

public class LocalApiContainer extends ApiContainer {

  @Inject LocalApi api;

  /**
   * 创建广告
   *
   * @param data (required)
   * @return LocalAddResponse
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   */
  public LocalAddResponseData localAdd(LocalAddRequest data)
      throws ApiException, TencentAdsResponseException {
    LocalAddResponse resp = api.localAdd(data);
    handleResponse(gson.toJson(resp));
    return resp.getData();
  }

  /**
   * 拉取广告列表
   *
   * @param data (required)
   * @return LocalGetResponse
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   */
  public LocalGetResponseData localGet(LocalGetRequest data)
      throws ApiException, TencentAdsResponseException {
    LocalGetResponse resp = api.localGet(data);
    handleResponse(gson.toJson(resp));
    return resp.getData();
  }

  /**
   * 更新广告
   *
   * @param data (required)
   * @return LocalUpdateResponse
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   */
  public LocalUpdateResponseData localUpdate(LocalUpdateRequest data)
      throws ApiException, TencentAdsResponseException {
    LocalUpdateResponse resp = api.localUpdate(data);
    handleResponse(gson.toJson(resp));
    return resp.getData();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy