Documentation ¶
Index ¶
- Constants
- Variables
- type App
- type AuthByCode
- type Client
- func (c *Client) Authorise(message chan<- string) error
- func (c *Client) GetAccessCode() (auth AuthByCode, err error)
- func (c *Client) GetCampaigns(ctx context.Context, dateRange statistics.DateRange) ([]string, error)
- func (c *Client) GetFiles(ctx context.Context, dir string, params statistics.ReportDefinition) ([]string, error)
- func (c *Client) GetReport(ctx context.Context, prefixTitleRequest, dir string, ...) ([]string, error)
- func (c *Client) GetTokenByCode(code AuthByCode) (token Token, err error)
- func (c *Client) GetYclidStat(ctx context.Context, yclids []string) ([]anti_fraud.Row, error)
- type Payload
- type Request
- type Response
- type Token
Constants ¶
View Source
const ( LIVE environment = "api.direct.yandex.com" SANDBOX environment = "api-sandbox.direct.yandex.com" )
Variables ¶
View Source
var ErrAuthorisationPending = responseError{
Err: "authorization_pending",
Msg: "User has not yet authorized your application",
}
Functions ¶
This section is empty.
Types ¶
type AuthByCode ¶
type Client ¶
type Client struct { Tr *http.Client Login string Token *string App *App // contains filtered or unexported fields }
func (*Client) GetAccessCode ¶
func (c *Client) GetAccessCode() (auth AuthByCode, err error)
func (*Client) GetCampaigns ¶ added in v1.3.3
func (*Client) GetFiles ¶
func (c *Client) GetFiles(ctx context.Context, dir string, params statistics.ReportDefinition) ([]string, error)
func (*Client) GetReport ¶
func (c *Client) GetReport(ctx context.Context, prefixTitleRequest, dir string, typeReport statistics.ReportType, fields []string, filter []statistics.Filter, dateRange statistics.DateRange) ([]string, error)
func (*Client) GetTokenByCode ¶
func (c *Client) GetTokenByCode(code AuthByCode) (token Token, err error)
func (*Client) GetYclidStat ¶ added in v1.3.2
type Payload ¶
type Payload struct { Method string `json:"method"` Params struct { Ads []struct { AdGroupID int `json:"AdGroupId"` TextAd struct { Text string `json:"Text"` Title string `json:"Title"` Href string `json:"Href,omitempty"` Mobile string `json:"Mobile"` } `json:"TextAd"` } `json:"Ads"` } `json:"params"` }
type Request ¶
type Request struct {
Params statistics.ReportDefinition `json:"params"`
}
Click to show internal directories.
Click to hide internal directories.