github.com/bububa/oceanengine/marketing-api@v0.0.0-20210315120513-0b953137f7a6/api/ad/get.go (about)

     1  package ad
     2  
     3  import (
     4  	"github.com/bububa/oceanengine/marketing-api/core"
     5  	"github.com/bububa/oceanengine/marketing-api/model/ad"
     6  )
     7  
     8  // 获取广告计划
     9  // 此接口用于获取广告计划列表的信息;
    10  // 如果创建计划时未设置对应的字段,返回的字段值会是null
    11  // 支持filtering过滤,可按广告计划ID、出价方式、广计划状态进行过滤筛选
    12  // 默认不获取删除的计划,如果要获取删除的计划,可在filtering中传入对应的status值;
    13  // 对于搜索广告计划信息获取参见【搜索广告投放】
    14  func Get(clt *core.SDKClient, accessToken string, req *ad.GetRequest) (*ad.GetResponse, error) {
    15  	var resp ad.GetResponse
    16  	err := clt.Get("2/ad/get/", req, &resp, accessToken)
    17  	if err != nil {
    18  		return nil, err
    19  	}
    20  	return &resp, nil
    21  }