# 巨量星图开放平台 Golang SDK

- Oauth2 授权 (api/oauth)
  - 生成授权链接 [ Url(clt *core.SDKClient, redirectUrl string, state string, materialAuth bool) string ]
  - 获取 AccessToken [ AccessToken(clt *core.SDKClient, authCode String) (*oauth.AccessTokenResponseData, error) ]
  - 刷新 Token [ RefreshToken(clt *core.SDKClient, refreshToken string) (*oauth.AccessTokenResponseData, error)]
- 账号服务
  - 广告主信息与资质管理
    - 获取星图账户信息 [ Info(clt *core.SDKClient, accessToken string, req *star.InfoRequest) ([]star.Info, error) ]
    - 修改广告主 [ agent.AdvertiserUpdate(clt *core.SDKClient, accessToken string, req *agent.AdvertiserUpdateRequest) (*agent.AdvertiserUpdateResponseData, error) ]
  - 代理商账号管理 (api/agent)
    - 广告主列表 [ AdvertiserSelect(clt *core.SDKClient, accessToken string, req *agent.AdvertiserSelectRequest) (*agent.AdvertiserSelectResponseData, error) ]
    - 二级代理商列表 [ ChildAgentSelect(clt *core.SDKClient, accessToken string, req *agent.ChildAgentSelectRequest) ([]uint64, error) ]
    - 获取代理商信息 [ Info(clt *core.SDKClient, accessToken string, req *agent.InfoRequest) ([]agent.Info, error) ]
  - 资金和流水管理
    - 批量查询账户余额 [ advertiser.AccountFundGet(clt *core.SDKClient, accessToken string, req *advertiser.AccountFundGetRequest) ([]advertiser.AccountFund, error) ]
    - 查询账号日流水 [ advertiser.FundDailyStat(clt *core.SDKClient, accessToken string, req *advertiser.FundDailyStatRequest) (*advertiser.FundDailyStatResponseData, error) ]
    - 查询代理商转账记录 [ agent.TransferTransactionRecord(clt *core.SDKClient, accessToken string, req *agent.TransferTransactionRecordRequest) (*agent.TransferTransactionRecordResult, error) ]
    - 查询账号流水明细 [ advertiser.FundTransactionGet(clt *core.SDKClient, accessToken string, req *advertiser.FundTransactionGetRequest) ([]advertiser.FundTransactionGetResponseList, error) ]
- 巨量星图 (api/star)
  - 获取星广联投(星图版)任务列表 [ task.List(ctx context.Context, clt *core.SDKClient, accessToken string, req *task.ListRequest) (*task.ListResult, error) ]
  - 获取星广联投(星图版)任务维度数据 [ task.Detail(ctx context.Context, clt *core.SDKClient, accessToken string, req *task.DetailRequest) (*task.Demand, error) ]
  - 获取星广联投(星图版)视频维度数据 [ task.ItemList(ctx context.Context, clt *core.SDKClient, accessToken string, req *task.ItemListRequest) ([]task.ItemStatInfo, error) ]
  - 获取星图客户任务列表 [ DemandList(clt *core.SDKClient, accessToken string, req *star.DemandListRequest) (*star.DemandListResult, error) ]
  - 获取星图客户任务订单列表 [ DemandOrderList(clt *core.SDKClient, accessToken string, req *star.DemandOrderListRequest) (*star.DemandOrderListResult, error) ]
  - 获取订单投后分析报表 [ ReportOrderOverviewGet(clt *core.SDKClient, accessToken string, req *star.ReportOrderOverviewGetRequest) (*star.ReportOrderOverviewGetResult, error) ]
  - 获取订单投后受众报表 [ ReportOrderUserDistributionGet(clt *core.SDKClient, accessToken string, req *star.ReportOrderUserDistributionGetRequest) (*star.ReportOrderUserDistributionGetResult, error) ]
  - 获取星图订单投后线索 [ ClueGet(clt *core.SDKClient, accessToken string, req *star.ClueGetRequest) (*star.ClueGetResult, error) ]
  - 获取任务下累计可查询的数据指标 [ ReportDataTopicConfig(ctx context.Context, clt *core.SDKClient, accessToken string, req *star.ReportDataTopicConfigRequest) ([]star.DataTopicConfig, error) ]
  - 获取投后数据主题累计数据 [ ReportCustomDataTopicConfig(ctx context.Context, clt *core.SDKClient, accessToken string, req *star.ReportDataTopicConfigRequest) (*star.ReportCustomDataTopicConfigResult, error) ]
  - 获取投后每日趋势数据（短视频） [ ReportCustomDataTopicDailyReport(ctx context.Context, clt *core.SDKClient, accessToken string, req *star.ReportCustomDataTopicDailyReportRequest) ([]star.ReportCustomDataTopicDailyReport, error) ]
