Movatterモバイル変換


[0]ホーム

URL:


displayvideo

package
v0.257.0Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:15Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

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

View Source
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

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

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

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

func (s *Operation) MarshalJSON() ([]byte,error)

typeSdfdownloadtasksOperationsGetCall

type SdfdownloadtasksOperationsGetCall struct {// contains filtered or unexported fields}

func (*SdfdownloadtasksOperationsGetCall)Context

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

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

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*SdfdownloadtasksOperationsGetCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*SdfdownloadtasksOperationsGetCall)IfNoneMatch

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

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

func New(client *http.Client) (*Service,error)

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

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

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).

func (*Status)MarshalJSON

func (s *Status) MarshalJSON() ([]byte,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp