displayvideo
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package displayvideo provides access to the Display & Video 360 API.
For product documentation, see:https://developers.google.com/display-video/
Creating a client¶
Usage example:
import "google.golang.org/api/displayvideo/v1dev"...ctx := context.Background()displayvideoService, err := displayvideo.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, seehttps://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:
displayvideoService, err := displayvideo.NewService(ctx, option.WithScopes(displayvideo.DoubleclickbidmanagerScope))
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
displayvideoService, err := displayvideo.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, ...)displayvideoService, err := displayvideo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seehttps://godoc.org/google.golang.org/api/option/ for details on options.
Index¶
- Constants
- type GoogleBytestreamMedia
- type MediaDownloadCall
- func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
- func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error)
- func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
- func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
- func (c *MediaDownloadCall) Header() http.Header
- func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall
- type MediaService
- type Operation
- type SdfdownloadtasksOperationsGetCall
- func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall
- func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
- func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall
- func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header
- func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall
- type SdfdownloadtasksOperationsService
- type SdfdownloadtasksService
- type Service
- type Status
Constants¶
const (// Create, see, edit, and permanently delete your Display & Video 360// entities and reportsDisplayVideoScope = "https://www.googleapis.com/auth/display-video"// View and manage your reports in DoubleClick Bid ManagerDoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeGoogleBytestreamMedia¶
type GoogleBytestreamMedia struct {// ResourceName: Name of the media resource.ResourceNamestring `json:"resourceName,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ResourceName") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ResourceName") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}GoogleBytestreamMedia: Media resource.
func (*GoogleBytestreamMedia)MarshalJSON¶
func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte,error)
typeMediaDownloadCall¶
type MediaDownloadCall struct {// contains filtered or unexported fields}func (*MediaDownloadCall)Context¶
func (c *MediaDownloadCall) Context(ctxcontext.Context) *MediaDownloadCall
Context sets the context to be used in this call's Do and Downloadmethods. Any pending HTTP request will be aborted if the providedcontext is canceled.
func (*MediaDownloadCall)Do¶
func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia,error)
Do executes the "displayvideo.media.download" call.Exactly one of *GoogleBytestreamMedia or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*GoogleBytestreamMedia.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*MediaDownloadCall)Download¶
func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response,error)
Download fetches the API endpoint's "media" value, instead of the normalAPI response value. If the returned error is nil, the Response is guaranteed tohave a 2xx status code. Callers must close the Response.Body as usual.
func (*MediaDownloadCall)Fields¶
func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*MediaDownloadCall)Header¶
func (c *MediaDownloadCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*MediaDownloadCall)IfNoneMatch¶
func (c *MediaDownloadCall) IfNoneMatch(entityTagstring) *MediaDownloadCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeMediaService¶
type MediaService struct {// contains filtered or unexported fields}funcNewMediaService¶
func NewMediaService(s *Service) *MediaService
func (*MediaService)Download¶
func (r *MediaService) Download(resourceNamestring) *MediaDownloadCall
Download: Downloads media. Download is supported on the URI`/download/{resource_name=**}?alt=media.` **Note**: Download requestswill not be successful without including `alt=media` query string.
typeOperation¶
type Operation struct {// Done: If the value is `false`, it means the operation is still in// progress. If `true`, the operation is completed, and either `error`// or `response` is available.Donebool `json:"done,omitempty"`// Error: The error result of the operation in case of failure or// cancellation.Error *Status `json:"error,omitempty"`// Metadata: Service-specific metadata associated with the operation. It// typically contains progress information and common metadata such as// create time. Some services might not provide such metadata. Any// method that returns a long-running operation should document the// metadata type, if any.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: The server-assigned name, which is only unique within the same// service that originally returns it. If you use the default HTTP// mapping, the `name` should be a resource name ending with// `operations/{unique_id}`.Namestring `json:"name,omitempty"`// Response: The normal response of the operation in case of success. If// the original method returns no data on success, such as `Delete`, the// response is `google.protobuf.Empty`. If the original method is// standard `Get`/`Create`/`Update`, the response should be the// resource. For other methods, the response should have the type// `XxxResponse`, where `Xxx` is the original method name. For example,// if the original method name is `TakeSnapshot()`, the inferred// response type is `TakeSnapshotResponse`.Responsegoogleapi.RawMessage `json:"response,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Done") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Done") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Operation: This resource represents a long-running operation that isthe result of a network API call.
func (*Operation)MarshalJSON¶
typeSdfdownloadtasksOperationsGetCall¶
type SdfdownloadtasksOperationsGetCall struct {// contains filtered or unexported fields}func (*SdfdownloadtasksOperationsGetCall)Context¶
func (c *SdfdownloadtasksOperationsGetCall) Context(ctxcontext.Context) *SdfdownloadtasksOperationsGetCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*SdfdownloadtasksOperationsGetCall)Do¶
func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation,error)
Do executes the "displayvideo.sdfdownloadtasks.operations.get" call.Exactly one of *Operation or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.
func (*SdfdownloadtasksOperationsGetCall)Fields¶
func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*SdfdownloadtasksOperationsGetCall)Header¶
func (c *SdfdownloadtasksOperationsGetCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
func (*SdfdownloadtasksOperationsGetCall)IfNoneMatch¶
func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTagstring) *SdfdownloadtasksOperationsGetCall
IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.
typeSdfdownloadtasksOperationsService¶
type SdfdownloadtasksOperationsService struct {// contains filtered or unexported fields}funcNewSdfdownloadtasksOperationsService¶
func NewSdfdownloadtasksOperationsService(s *Service) *SdfdownloadtasksOperationsService
func (*SdfdownloadtasksOperationsService)Get¶
func (r *SdfdownloadtasksOperationsService) Get(namestring) *SdfdownloadtasksOperationsGetCall
Get: Gets the latest state of an asynchronous SDF download taskoperation. Clients should poll this method at intervals of 30seconds.
typeSdfdownloadtasksService¶
type SdfdownloadtasksService struct {Operations *SdfdownloadtasksOperationsService// contains filtered or unexported fields}funcNewSdfdownloadtasksService¶
func NewSdfdownloadtasksService(s *Service) *SdfdownloadtasksService
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentMedia *MediaServiceSdfdownloadtasks *SdfdownloadtasksService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶
NewService creates a new Service.
typeStatus¶
type Status struct {// Code: The status code, which should be an enum value of// google.rpc.Code.Codeint64 `json:"code,omitempty"`// Details: A list of messages that carry the error details. There is a// common set of message types for APIs to use.Details []googleapi.RawMessage `json:"details,omitempty"`// Message: A developer-facing error message, which should be in// English. Any user-facing error message should be localized and sent// in the google.rpc.Status.details field, or localized by the client.Messagestring `json:"message,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Status: The `Status` type defines a logical error model that issuitable for different programming environments, including REST APIsand RPC APIs. It is used by [gRPC](https://github.com/grpc). Each`Status` message contains three pieces of data: error code, errormessage, and error details. You can find out more about this errormodel and how to work with it in the [API DesignGuide](https://cloud.google.com/apis/design/errors).