Documentation
Overview ¶
Package dfareporting provides access to the DCM/DFA Reporting And Trafficking API.
For product documentation, see: https://developers.google.com/doubleclick-advertisers/
Creating a client ¶
Usage example:
import "google.golang.org/api/dfareporting/v3.0" ... ctx := context.Background() dfareportingService, err := dfareporting.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
dfareportingService, err := dfareporting.NewService(ctx, option.WithScopes(dfareporting.DfatraffickingScope))
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
dfareportingService, err := dfareporting.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) dfareportingService, err := dfareporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- type Account
- type AccountActiveAdSummariesGetCall
- func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall
- func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error)
- func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall
- func (c *AccountActiveAdSummariesGetCall) Header() http.Header
- func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall
- type AccountActiveAdSummariesService