Documentation ¶
Index ¶
- Variables
- type AdApiError
- type BulkService
- type BulkServiceI
- type ErrorsType
- type Fault
- type GetBulkUploadStatusRequest
- type GetBulkUploadStatusResponse
- type GetBulkUploadUrlRequest
- type GetBulkUploadUrlResponse
- type HttpClient
- type OperationError
- type RequestBody
- type RequestEnvelope
- type RequestHeader
- type Session
- type SessionConfig
- type SoapResponseBody
- type SoapResponseEnvelope
- type TrackingId
- type UploadBulkFileResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EnvelopeNamespace = "http://schemas.xmlsoap.org/soap/envelope/" BingNamespace = "https://bingads.microsoft.com/CampaignManagement/v13" AuthEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize" TokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token" )
Functions ¶
This section is empty.
Types ¶
type AdApiError ¶
type BulkService ¶
func NewBulkService ¶
func NewBulkService(session *Session) *BulkService
func (*BulkService) GetBulkUploadStatus ¶
func (c *BulkService) GetBulkUploadStatus(requestId string) (*GetBulkUploadStatusResponse, error)
GetBulkUploadUrl
func (*BulkService) GetBulkUploadUrl ¶
func (c *BulkService) GetBulkUploadUrl() (*GetBulkUploadUrlResponse, error)
GetBulkUploadUrl
func (*BulkService) UploadBulkFile ¶
func (c *BulkService) UploadBulkFile(url, filename string) (*UploadBulkFileResponse, error)
type BulkServiceI ¶
type BulkServiceI interface { GetBulkUploadUrl() (*GetBulkUploadUrlResponse, error) GetBulkUploadStatus(requestId string) (*GetBulkUploadStatusResponse, error) UploadBulkFile(url, filename string) (*UploadBulkFileResponse, error) }
type ErrorsType ¶
type ErrorsType struct { TrackingId string `xml:"TrackingId"` AdApiErrors []AdApiError `xml:"Errors"` OperationErrors []OperationError `xml:"OperationErrors"` }
func (*ErrorsType) Error ¶
func (f *ErrorsType) Error() string
type Fault ¶
type Fault struct { FaultCode string `xml:"faultcode"` FaultString string `xml:"faultstring"` Detail struct { XMLName xml.Name `xml:"detail"` Errors ErrorsType `xml:",any"` } }
type GetBulkUploadUrlRequest ¶
type OperationError ¶
type RequestBody ¶
type RequestEnvelope ¶
type RequestEnvelope struct { XMLName xml.Name `xml:"s:Envelope"` EnvNS string `xml:"xmlns:i,attr"` EnvSS string `xml:"xmlns:s,attr"` Header RequestHeader Body RequestBody }
type RequestHeader ¶
type RequestHeader struct { XMLName xml.Name `xml:"s:Header"` BingNS string `xml:"xmlns,attr"` Action string AuthenticationToken string `xml:"AuthenticationToken,omitempty"` CustomerAccountId string `xml:"CustomerAccountId"` CustomerId string `xml:"CustomerId,omitempty"` DeveloperToken string `xml:"DeveloperToken"` Password string `xml:"Password,omitempty"` Username string `xml:"UserName,omitempty"` }
type Session ¶
type Session struct { AccountId string CustomerId string DeveloperToken string Username string Password string HTTPClient HttpClient TokenSource oauth2.TokenSource }
func NewSession ¶
func NewSession(config SessionConfig) *Session
type SessionConfig ¶
type SessionConfig struct { OAuth2Config *oauth2.Config OAuth2Token *oauth2.Token AccountId string CustomerId string DeveloperToken string HTTPClient HttpClient TokenSource oauth2.TokenSource }
type SoapResponseBody ¶
type SoapResponseBody struct {
OperationResponse []byte `xml:",innerxml"`
}
type SoapResponseEnvelope ¶
type SoapResponseEnvelope struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"` Header TrackingId `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"` Body SoapResponseBody `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"` }
type TrackingId ¶
type UploadBulkFileResponse ¶
Click to show internal directories.
Click to hide internal directories.