ocean

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2022 License: Zlib Imports: 16 Imported by: 0

README

巨量引擎广告投放开放平台

Documentation

Index

Constants

View Source
const (
	AccessTokenExpire  = 40102 //	access token过期
	InvalidAccessToken = 40105 //access token错误
)

https://ad.oceanengine.com/athena/docs/index.html?plat_id=-1&doc_id=26&id=528&key=6766e1cbbd53f0fbb54d947b5f4802f2317cb8b93833884dfd7ad3181b245a12

View Source
const ApiPrefixUrl = "https://ad.oceanengine.com/open_api"

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(tk token.Token, d data.D) (access.Token, error)

func NewToken

func NewToken(app app.App) token.Token

func RefreshToken

func RefreshToken(tk token.Token, d data.D) (access.Token, error)

Types

type AccessToken

type AccessToken struct {
	AcsToken    string `json:"access_token"`
	RefToken    string `json:"refresh_token"`
	AcsExpireIn int64  `json:"expires_in"`
	RefExpireIn int64  `json:"refresh_token_expires_in"`
}

func (AccessToken) GetAccessToken

func (a AccessToken) GetAccessToken() access.Value

access.Token interface implement

func (AccessToken) GetRefAccessToken

func (a AccessToken) GetRefAccessToken() access.Value

type AcsData

type AcsData struct {
	AccessToken
	AdIds []int64 `json:"advertiser_ids,omitempty"`
}

type AuthAdvertiser

type AuthAdvertiser struct {
	AdvertiserId   int64 `json:"advertiser_id"`
	AdvertiserName int64 `json:"advertiser_name"`
	AdvertiserRole int64 `json:"advertiser_role"`
	IsValid        int64 `json:"is_valid"`
	AccountRole    int64 `json:"account_role"`
}

type AuthInfo

type AuthInfo struct {
	Advertisers []AuthAdvertiser `json:"list,omitempty"`
}

func GetAuthAccount

func GetAuthAccount(tk token.Token, d data.D) (*AuthInfo, error)

type Response

type Response struct {
	Code int32  `json:"code"`
	Msg  string `json:"message"`
}

func (Response) ReturnIf

func (r Response) ReturnIf(api *api.Api) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL