youtubereporting
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 youtubereporting provides access to the YouTube Reporting API.
For product documentation, see:https://developers.google.com/youtube/reporting/v1/reports/
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/youtubereporting/v1"...ctx := context.Background()youtubereportingService, err := youtubereporting.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault 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, usegoogle.golang.org/api/option.WithScopes:
youtubereportingService, err := youtubereporting.NewService(ctx, option.WithScopes(youtubereporting.YtAnalyticsReadonlyScope))
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
youtubereportingService, err := youtubereporting.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)youtubereportingService, err := youtubereporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type Empty
- type GdataBlobstore2Info
- type GdataCompositeMedia
- type GdataContentTypeInfo
- type GdataDiffChecksumsResponse
- type GdataDiffDownloadResponse
- type GdataDiffUploadRequest
- type GdataDiffUploadResponse
- type GdataDiffVersionResponse
- type GdataDownloadParameters
- type GdataMedia
- type GdataObjectId
- type Job
- type JobsCreateCall
- func (c *JobsCreateCall) Context(ctx context.Context) *JobsCreateCall
- func (c *JobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error)
- func (c *JobsCreateCall) Fields(s ...googleapi.Field) *JobsCreateCall
- func (c *JobsCreateCall) Header() http.Header
- func (c *JobsCreateCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *JobsCreateCall
- type JobsDeleteCall
- func (c *JobsDeleteCall) Context(ctx context.Context) *JobsDeleteCall
- func (c *JobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *JobsDeleteCall) Fields(s ...googleapi.Field) *JobsDeleteCall
- func (c *JobsDeleteCall) Header() http.Header
- func (c *JobsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *JobsDeleteCall
- type JobsGetCall
- func (c *JobsGetCall) Context(ctx context.Context) *JobsGetCall
- func (c *JobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error)
- func (c *JobsGetCall) Fields(s ...googleapi.Field) *JobsGetCall
- func (c *JobsGetCall) Header() http.Header
- func (c *JobsGetCall) IfNoneMatch(entityTag string) *JobsGetCall
- func (c *JobsGetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *JobsGetCall
- type JobsListCall
- func (c *JobsListCall) Context(ctx context.Context) *JobsListCall
- func (c *JobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error)
- func (c *JobsListCall) Fields(s ...googleapi.Field) *JobsListCall
- func (c *JobsListCall) Header() http.Header
- func (c *JobsListCall) IfNoneMatch(entityTag string) *JobsListCall
- func (c *JobsListCall) IncludeSystemManaged(includeSystemManaged bool) *JobsListCall
- func (c *JobsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *JobsListCall
- func (c *JobsListCall) PageSize(pageSize int64) *JobsListCall
- func (c *JobsListCall) PageToken(pageToken string) *JobsListCall
- func (c *JobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error
- type JobsReportsGetCall
- func (c *JobsReportsGetCall) Context(ctx context.Context) *JobsReportsGetCall
- func (c *JobsReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error)
- func (c *JobsReportsGetCall) Fields(s ...googleapi.Field) *JobsReportsGetCall
- func (c *JobsReportsGetCall) Header() http.Header
- func (c *JobsReportsGetCall) IfNoneMatch(entityTag string) *JobsReportsGetCall
- func (c *JobsReportsGetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *JobsReportsGetCall
- type JobsReportsListCall
- func (c *JobsReportsListCall) Context(ctx context.Context) *JobsReportsListCall
- func (c *JobsReportsListCall) CreatedAfter(createdAfter string) *JobsReportsListCall
- func (c *JobsReportsListCall) Do(opts ...googleapi.CallOption) (*ListReportsResponse, error)
- func (c *JobsReportsListCall) Fields(s ...googleapi.Field) *JobsReportsListCall
- func (c *JobsReportsListCall) Header() http.Header
- func (c *JobsReportsListCall) IfNoneMatch(entityTag string) *JobsReportsListCall
- func (c *JobsReportsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *JobsReportsListCall
- func (c *JobsReportsListCall) PageSize(pageSize int64) *JobsReportsListCall
- func (c *JobsReportsListCall) PageToken(pageToken string) *JobsReportsListCall
- func (c *JobsReportsListCall) Pages(ctx context.Context, f func(*ListReportsResponse) error) error
- func (c *JobsReportsListCall) StartTimeAtOrAfter(startTimeAtOrAfter string) *JobsReportsListCall
- func (c *JobsReportsListCall) StartTimeBefore(startTimeBefore string) *JobsReportsListCall
- type JobsReportsService
- type JobsService
- type ListJobsResponse
- type ListReportTypesResponse
- type ListReportsResponse
- type MediaDownloadCall
- func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
- func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GdataMedia, 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 Report
- type ReportType
- type ReportTypesListCall
- func (c *ReportTypesListCall) Context(ctx context.Context) *ReportTypesListCall
- func (c *ReportTypesListCall) Do(opts ...googleapi.CallOption) (*ListReportTypesResponse, error)
- func (c *ReportTypesListCall) Fields(s ...googleapi.Field) *ReportTypesListCall
- func (c *ReportTypesListCall) Header() http.Header
- func (c *ReportTypesListCall) IfNoneMatch(entityTag string) *ReportTypesListCall
- func (c *ReportTypesListCall) IncludeSystemManaged(includeSystemManaged bool) *ReportTypesListCall
- func (c *ReportTypesListCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string) *ReportTypesListCall
- func (c *ReportTypesListCall) PageSize(pageSize int64) *ReportTypesListCall
- func (c *ReportTypesListCall) PageToken(pageToken string) *ReportTypesListCall
- func (c *ReportTypesListCall) Pages(ctx context.Context, f func(*ListReportTypesResponse) error) error
- type ReportTypesService
- type Service
Constants¶
const (// View monetary and non-monetary YouTube Analytics reports for your YouTube// contentYtAnalyticsMonetaryReadonlyScope = "https://www.googleapis.com/auth/yt-analytics-monetary.readonly"// View YouTube Analytics reports for your YouTube contentYtAnalyticsReadonlyScope = "https://www.googleapis.com/auth/yt-analytics.readonly")
OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeEmpty¶
type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
typeGdataBlobstore2Info¶
type GdataBlobstore2Info struct {// BlobGeneration: gdataBlobGenerationint64 `json:"blobGeneration,omitempty,string"`// BlobId: gdataBlobIdstring `json:"blobId,omitempty"`// DownloadExternalReadToken: gdataDownloadExternalReadTokenstring `json:"downloadExternalReadToken,omitempty"`// DownloadReadHandle: gdataDownloadReadHandlestring `json:"downloadReadHandle,omitempty"`// ReadToken: gdataReadTokenstring `json:"readToken,omitempty"`// UploadMetadataContainer: gdataUploadMetadataContainerstring `json:"uploadMetadataContainer,omitempty"`// ForceSendFields is a list of field names (e.g. "BlobGeneration") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BlobGeneration") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataBlobstore2Info: gdata
func (GdataBlobstore2Info)MarshalJSON¶
func (sGdataBlobstore2Info) MarshalJSON() ([]byte,error)
typeGdataCompositeMedia¶
type GdataCompositeMedia struct {// BlobRef: gdataBlobRefstring `json:"blobRef,omitempty"`// Blobstore2Info: gdataBlobstore2Info *GdataBlobstore2Info `json:"blobstore2Info,omitempty"`// CosmoBinaryReference: gdataCosmoBinaryReferencestring `json:"cosmoBinaryReference,omitempty"`// Crc32cHash: gdataCrc32cHashint64 `json:"crc32cHash,omitempty"`// Inline: gdataInlinestring `json:"inline,omitempty"`// Length: gdataLengthint64 `json:"length,omitempty,string"`// Md5Hash: gdataMd5Hashstring `json:"md5Hash,omitempty"`// ObjectId: gdataObjectId *GdataObjectId `json:"objectId,omitempty"`// Path: gdataPathstring `json:"path,omitempty"`// ReferenceType: gdata//// Possible values:// "PATH" - gdata// "BLOB_REF" - gdata// "INLINE" - gdata// "BIGSTORE_REF" - gdata// "COSMO_BINARY_REFERENCE" - gdataReferenceTypestring `json:"referenceType,omitempty"`// Sha1Hash: gdataSha1Hashstring `json:"sha1Hash,omitempty"`// ForceSendFields is a list of field names (e.g. "BlobRef") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BlobRef") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataCompositeMedia: gdata
func (GdataCompositeMedia)MarshalJSON¶
func (sGdataCompositeMedia) MarshalJSON() ([]byte,error)
typeGdataContentTypeInfo¶
type GdataContentTypeInfo struct {// BestGuess: gdataBestGuessstring `json:"bestGuess,omitempty"`// FromBytes: gdataFromBytesstring `json:"fromBytes,omitempty"`// FromFileName: gdataFromFileNamestring `json:"fromFileName,omitempty"`// FromHeader: gdataFromHeaderstring `json:"fromHeader,omitempty"`// FromUrlPath: gdataFromUrlPathstring `json:"fromUrlPath,omitempty"`// ForceSendFields is a list of field names (e.g. "BestGuess") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BestGuess") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataContentTypeInfo: gdata
func (GdataContentTypeInfo)MarshalJSON¶
func (sGdataContentTypeInfo) MarshalJSON() ([]byte,error)
typeGdataDiffChecksumsResponse¶
type GdataDiffChecksumsResponse struct {// ChecksumsLocation: gdataChecksumsLocation *GdataCompositeMedia `json:"checksumsLocation,omitempty"`// ChunkSizeBytes: gdataChunkSizeBytesint64 `json:"chunkSizeBytes,omitempty,string"`// ObjectLocation: gdataObjectLocation *GdataCompositeMedia `json:"objectLocation,omitempty"`// ObjectSizeBytes: gdataObjectSizeBytesint64 `json:"objectSizeBytes,omitempty,string"`// ObjectVersion: gdataObjectVersionstring `json:"objectVersion,omitempty"`// ForceSendFields is a list of field names (e.g. "ChecksumsLocation") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ChecksumsLocation") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataDiffChecksumsResponse: gdata
func (GdataDiffChecksumsResponse)MarshalJSON¶
func (sGdataDiffChecksumsResponse) MarshalJSON() ([]byte,error)
typeGdataDiffDownloadResponse¶
type GdataDiffDownloadResponse struct {// ObjectLocation: gdataObjectLocation *GdataCompositeMedia `json:"objectLocation,omitempty"`// ForceSendFields is a list of field names (e.g. "ObjectLocation") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ObjectLocation") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataDiffDownloadResponse: gdata
func (GdataDiffDownloadResponse)MarshalJSON¶
func (sGdataDiffDownloadResponse) MarshalJSON() ([]byte,error)
typeGdataDiffUploadRequest¶
type GdataDiffUploadRequest struct {// ChecksumsInfo: gdataChecksumsInfo *GdataCompositeMedia `json:"checksumsInfo,omitempty"`// ObjectInfo: gdataObjectInfo *GdataCompositeMedia `json:"objectInfo,omitempty"`// ObjectVersion: gdataObjectVersionstring `json:"objectVersion,omitempty"`// ForceSendFields is a list of field names (e.g. "ChecksumsInfo") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ChecksumsInfo") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataDiffUploadRequest: gdata
func (GdataDiffUploadRequest)MarshalJSON¶
func (sGdataDiffUploadRequest) MarshalJSON() ([]byte,error)
typeGdataDiffUploadResponse¶
type GdataDiffUploadResponse struct {// ObjectVersion: gdataObjectVersionstring `json:"objectVersion,omitempty"`// OriginalObject: gdataOriginalObject *GdataCompositeMedia `json:"originalObject,omitempty"`// ForceSendFields is a list of field names (e.g. "ObjectVersion") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ObjectVersion") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataDiffUploadResponse: gdata
func (GdataDiffUploadResponse)MarshalJSON¶
func (sGdataDiffUploadResponse) MarshalJSON() ([]byte,error)
typeGdataDiffVersionResponse¶
type GdataDiffVersionResponse struct {// ObjectSizeBytes: gdataObjectSizeBytesint64 `json:"objectSizeBytes,omitempty,string"`// ObjectVersion: gdataObjectVersionstring `json:"objectVersion,omitempty"`// ForceSendFields is a list of field names (e.g. "ObjectSizeBytes") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ObjectSizeBytes") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataDiffVersionResponse: gdata
func (GdataDiffVersionResponse)MarshalJSON¶
func (sGdataDiffVersionResponse) MarshalJSON() ([]byte,error)
typeGdataDownloadParameters¶
type GdataDownloadParameters struct {// AllowGzipCompression: gdataAllowGzipCompressionbool `json:"allowGzipCompression,omitempty"`// IgnoreRange: gdataIgnoreRangebool `json:"ignoreRange,omitempty"`// ForceSendFields is a list of field names (e.g. "AllowGzipCompression") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AllowGzipCompression") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataDownloadParameters: gdata
func (GdataDownloadParameters)MarshalJSON¶
func (sGdataDownloadParameters) MarshalJSON() ([]byte,error)
typeGdataMedia¶
type GdataMedia struct {// Algorithm: gdataAlgorithmstring `json:"algorithm,omitempty"`// BigstoreObjectRef: gdataBigstoreObjectRefstring `json:"bigstoreObjectRef,omitempty"`// BlobRef: gdataBlobRefstring `json:"blobRef,omitempty"`// Blobstore2Info: gdataBlobstore2Info *GdataBlobstore2Info `json:"blobstore2Info,omitempty"`// CompositeMedia: gdataCompositeMedia []*GdataCompositeMedia `json:"compositeMedia,omitempty"`// ContentType: gdataContentTypestring `json:"contentType,omitempty"`// ContentTypeInfo: gdataContentTypeInfo *GdataContentTypeInfo `json:"contentTypeInfo,omitempty"`// CosmoBinaryReference: gdataCosmoBinaryReferencestring `json:"cosmoBinaryReference,omitempty"`// Crc32cHash: gdataCrc32cHashint64 `json:"crc32cHash,omitempty"`// DiffChecksumsResponse: gdataDiffChecksumsResponse *GdataDiffChecksumsResponse `json:"diffChecksumsResponse,omitempty"`// DiffDownloadResponse: gdataDiffDownloadResponse *GdataDiffDownloadResponse `json:"diffDownloadResponse,omitempty"`// DiffUploadRequest: gdataDiffUploadRequest *GdataDiffUploadRequest `json:"diffUploadRequest,omitempty"`// DiffUploadResponse: gdataDiffUploadResponse *GdataDiffUploadResponse `json:"diffUploadResponse,omitempty"`// DiffVersionResponse: gdataDiffVersionResponse *GdataDiffVersionResponse `json:"diffVersionResponse,omitempty"`// DownloadParameters: gdataDownloadParameters *GdataDownloadParameters `json:"downloadParameters,omitempty"`// Filename: gdataFilenamestring `json:"filename,omitempty"`// Hash: gdataHashstring `json:"hash,omitempty"`// HashVerified: gdataHashVerifiedbool `json:"hashVerified,omitempty"`// Inline: gdataInlinestring `json:"inline,omitempty"`// IsPotentialRetry: gdataIsPotentialRetrybool `json:"isPotentialRetry,omitempty"`// Length: gdataLengthint64 `json:"length,omitempty,string"`// Md5Hash: gdataMd5Hashstring `json:"md5Hash,omitempty"`// MediaId: gdataMediaIdstring `json:"mediaId,omitempty"`// ObjectId: gdataObjectId *GdataObjectId `json:"objectId,omitempty"`// Path: gdataPathstring `json:"path,omitempty"`// ReferenceType: gdata//// Possible values:// "PATH" - gdata// "BLOB_REF" - gdata// "INLINE" - gdata// "GET_MEDIA" - gdata// "COMPOSITE_MEDIA" - gdata// "BIGSTORE_REF" - gdata// "DIFF_VERSION_RESPONSE" - gdata// "DIFF_CHECKSUMS_RESPONSE" - gdata// "DIFF_DOWNLOAD_RESPONSE" - gdata// "DIFF_UPLOAD_REQUEST" - gdata// "DIFF_UPLOAD_RESPONSE" - gdata// "COSMO_BINARY_REFERENCE" - gdata// "ARBITRARY_BYTES" - gdataReferenceTypestring `json:"referenceType,omitempty"`// Sha1Hash: gdataSha1Hashstring `json:"sha1Hash,omitempty"`// Sha256Hash: gdataSha256Hashstring `json:"sha256Hash,omitempty"`// Timestamp: gdataTimestampuint64 `json:"timestamp,omitempty,string"`// Token: gdataTokenstring `json:"token,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Algorithm") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Algorithm") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataMedia: gdata
func (GdataMedia)MarshalJSON¶
func (sGdataMedia) MarshalJSON() ([]byte,error)
typeGdataObjectId¶
type GdataObjectId struct {// BucketName: gdataBucketNamestring `json:"bucketName,omitempty"`// Generation: gdataGenerationint64 `json:"generation,omitempty,string"`// ObjectName: gdataObjectNamestring `json:"objectName,omitempty"`// ForceSendFields is a list of field names (e.g. "BucketName") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BucketName") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}GdataObjectId: gdata
func (GdataObjectId)MarshalJSON¶
func (sGdataObjectId) MarshalJSON() ([]byte,error)
typeJob¶
type Job struct {// CreateTime: The creation date/time of the job.CreateTimestring `json:"createTime,omitempty"`// ExpireTime: The date/time when this job will expire/expired. After a job// expired, no new reports are generated.ExpireTimestring `json:"expireTime,omitempty"`// Id: The server-generated ID of the job (max. 40 characters).Idstring `json:"id,omitempty"`// Name: The name of the job (max. 100 characters).Namestring `json:"name,omitempty"`// ReportTypeId: The type of reports this job creates. Corresponds to the ID of// a ReportType.ReportTypeIdstring `json:"reportTypeId,omitempty"`// SystemManaged: True if this a system-managed job that cannot be modified by// the user; otherwise false.SystemManagedbool `json:"systemManaged,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Job: A job creating reports of a specific type.
func (Job)MarshalJSON¶
typeJobsCreateCall¶
type JobsCreateCall struct {// contains filtered or unexported fields}func (*JobsCreateCall)Context¶
func (c *JobsCreateCall) Context(ctxcontext.Context) *JobsCreateCall
Context sets the context to be used in this call's Do method.
func (*JobsCreateCall)Do¶
func (c *JobsCreateCall) Do(opts ...googleapi.CallOption) (*Job,error)
Do executes the "youtubereporting.jobs.create" call.Any non-2xx status code is an error. Response headers are in either*Job.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*JobsCreateCall)Fields¶
func (c *JobsCreateCall) Fields(s ...googleapi.Field) *JobsCreateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*JobsCreateCall)Header¶
func (c *JobsCreateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*JobsCreateCall)OnBehalfOfContentOwner¶
func (c *JobsCreateCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *JobsCreateCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
typeJobsDeleteCall¶
type JobsDeleteCall struct {// contains filtered or unexported fields}func (*JobsDeleteCall)Context¶
func (c *JobsDeleteCall) Context(ctxcontext.Context) *JobsDeleteCall
Context sets the context to be used in this call's Do method.
func (*JobsDeleteCall)Do¶
func (c *JobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "youtubereporting.jobs.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*JobsDeleteCall)Fields¶
func (c *JobsDeleteCall) Fields(s ...googleapi.Field) *JobsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*JobsDeleteCall)Header¶
func (c *JobsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*JobsDeleteCall)OnBehalfOfContentOwner¶
func (c *JobsDeleteCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *JobsDeleteCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
typeJobsGetCall¶
type JobsGetCall struct {// contains filtered or unexported fields}func (*JobsGetCall)Context¶
func (c *JobsGetCall) Context(ctxcontext.Context) *JobsGetCall
Context sets the context to be used in this call's Do method.
func (*JobsGetCall)Do¶
func (c *JobsGetCall) Do(opts ...googleapi.CallOption) (*Job,error)
Do executes the "youtubereporting.jobs.get" call.Any non-2xx status code is an error. Response headers are in either*Job.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*JobsGetCall)Fields¶
func (c *JobsGetCall) Fields(s ...googleapi.Field) *JobsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*JobsGetCall)Header¶
func (c *JobsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*JobsGetCall)IfNoneMatch¶
func (c *JobsGetCall) IfNoneMatch(entityTagstring) *JobsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*JobsGetCall)OnBehalfOfContentOwner¶
func (c *JobsGetCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *JobsGetCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
typeJobsListCall¶
type JobsListCall struct {// contains filtered or unexported fields}func (*JobsListCall)Context¶
func (c *JobsListCall) Context(ctxcontext.Context) *JobsListCall
Context sets the context to be used in this call's Do method.
func (*JobsListCall)Do¶
func (c *JobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse,error)
Do executes the "youtubereporting.jobs.list" call.Any non-2xx status code is an error. Response headers are in either*ListJobsResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*JobsListCall)Fields¶
func (c *JobsListCall) Fields(s ...googleapi.Field) *JobsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*JobsListCall)Header¶
func (c *JobsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*JobsListCall)IfNoneMatch¶
func (c *JobsListCall) IfNoneMatch(entityTagstring) *JobsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*JobsListCall)IncludeSystemManaged¶
func (c *JobsListCall) IncludeSystemManaged(includeSystemManagedbool) *JobsListCall
IncludeSystemManaged sets the optional parameter "includeSystemManaged": Ifset to true, also system-managed jobs will be returned; otherwise onlyuser-created jobs will be returned. System-managed jobs can neither bemodified nor deleted.
func (*JobsListCall)OnBehalfOfContentOwner¶
func (c *JobsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *JobsListCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
func (*JobsListCall)PageSize¶
func (c *JobsListCall) PageSize(pageSizeint64) *JobsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Servermay return fewer jobs than requested. If unspecified, server will pick anappropriate default.
func (*JobsListCall)PageToken¶
func (c *JobsListCall) PageToken(pageTokenstring) *JobsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListReportTypesResponse.next_page_token returned in response to the previouscall to the `ListJobs` method.
func (*JobsListCall)Pages¶
func (c *JobsListCall) Pages(ctxcontext.Context, f func(*ListJobsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeJobsReportsGetCall¶
type JobsReportsGetCall struct {// contains filtered or unexported fields}func (*JobsReportsGetCall)Context¶
func (c *JobsReportsGetCall) Context(ctxcontext.Context) *JobsReportsGetCall
Context sets the context to be used in this call's Do method.
func (*JobsReportsGetCall)Do¶
func (c *JobsReportsGetCall) Do(opts ...googleapi.CallOption) (*Report,error)
Do executes the "youtubereporting.jobs.reports.get" call.Any non-2xx status code is an error. Response headers are in either*Report.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*JobsReportsGetCall)Fields¶
func (c *JobsReportsGetCall) Fields(s ...googleapi.Field) *JobsReportsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*JobsReportsGetCall)Header¶
func (c *JobsReportsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*JobsReportsGetCall)IfNoneMatch¶
func (c *JobsReportsGetCall) IfNoneMatch(entityTagstring) *JobsReportsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*JobsReportsGetCall)OnBehalfOfContentOwner¶
func (c *JobsReportsGetCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *JobsReportsGetCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
typeJobsReportsListCall¶
type JobsReportsListCall struct {// contains filtered or unexported fields}func (*JobsReportsListCall)Context¶
func (c *JobsReportsListCall) Context(ctxcontext.Context) *JobsReportsListCall
Context sets the context to be used in this call's Do method.
func (*JobsReportsListCall)CreatedAfter¶
func (c *JobsReportsListCall) CreatedAfter(createdAfterstring) *JobsReportsListCall
CreatedAfter sets the optional parameter "createdAfter": If set, onlyreports created after the specified date/time are returned.
func (*JobsReportsListCall)Do¶
func (c *JobsReportsListCall) Do(opts ...googleapi.CallOption) (*ListReportsResponse,error)
Do executes the "youtubereporting.jobs.reports.list" call.Any non-2xx status code is an error. Response headers are in either*ListReportsResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*JobsReportsListCall)Fields¶
func (c *JobsReportsListCall) Fields(s ...googleapi.Field) *JobsReportsListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*JobsReportsListCall)Header¶
func (c *JobsReportsListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*JobsReportsListCall)IfNoneMatch¶
func (c *JobsReportsListCall) IfNoneMatch(entityTagstring) *JobsReportsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*JobsReportsListCall)OnBehalfOfContentOwner¶
func (c *JobsReportsListCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *JobsReportsListCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
func (*JobsReportsListCall)PageSize¶
func (c *JobsReportsListCall) PageSize(pageSizeint64) *JobsReportsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Servermay return fewer report types than requested. If unspecified, server willpick an appropriate default.
func (*JobsReportsListCall)PageToken¶
func (c *JobsReportsListCall) PageToken(pageTokenstring) *JobsReportsListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListReportsResponse.next_page_token returned in response to the previouscall to the `ListReports` method.
func (*JobsReportsListCall)Pages¶
func (c *JobsReportsListCall) Pages(ctxcontext.Context, f func(*ListReportsResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
func (*JobsReportsListCall)StartTimeAtOrAfter¶
func (c *JobsReportsListCall) StartTimeAtOrAfter(startTimeAtOrAfterstring) *JobsReportsListCall
StartTimeAtOrAfter sets the optional parameter "startTimeAtOrAfter": If set,only reports whose start time is greater than or equal the specifieddate/time are returned.
func (*JobsReportsListCall)StartTimeBefore¶
func (c *JobsReportsListCall) StartTimeBefore(startTimeBeforestring) *JobsReportsListCall
StartTimeBefore sets the optional parameter "startTimeBefore": If set, onlyreports whose start time is smaller than the specified date/time arereturned.
typeJobsReportsService¶
type JobsReportsService struct {// contains filtered or unexported fields}funcNewJobsReportsService¶
func NewJobsReportsService(s *Service) *JobsReportsService
func (*JobsReportsService)Get¶
func (r *JobsReportsService) Get(jobIdstring, reportIdstring) *JobsReportsGetCall
Get: Gets the metadata of a specific report.
- jobId: The ID of the job.- reportId: The ID of the report to retrieve.
func (*JobsReportsService)List¶
func (r *JobsReportsService) List(jobIdstring) *JobsReportsListCall
List: Lists reports created by a specific job. Returns NOT_FOUND if the jobdoes not exist.
- jobId: The ID of the job.
typeJobsService¶
type JobsService struct {Reports *JobsReportsService// contains filtered or unexported fields}funcNewJobsService¶
func NewJobsService(s *Service) *JobsService
func (*JobsService)Create¶
func (r *JobsService) Create(job *Job) *JobsCreateCall
Create: Creates a job and returns it.
func (*JobsService)Delete¶
func (r *JobsService) Delete(jobIdstring) *JobsDeleteCall
Delete: Deletes a job.
- jobId: The ID of the job to delete.
func (*JobsService)Get¶
func (r *JobsService) Get(jobIdstring) *JobsGetCall
Get: Gets a job.
- jobId: The ID of the job to retrieve.
typeListJobsResponse¶
type ListJobsResponse struct {// Jobs: The list of jobs.Jobs []*Job `json:"jobs,omitempty"`// NextPageToken: A token to retrieve next page of results. Pass this value in// the ListJobsRequest.page_token field in the subsequent call to `ListJobs`// method to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Jobs") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Jobs") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListJobsResponse: Response message for ReportingService.ListJobs.
func (ListJobsResponse)MarshalJSON¶
func (sListJobsResponse) MarshalJSON() ([]byte,error)
typeListReportTypesResponse¶
type ListReportTypesResponse struct {// NextPageToken: A token to retrieve next page of results. Pass this value in// the ListReportTypesRequest.page_token field in the subsequent call to// `ListReportTypes` method to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// ReportTypes: The list of report types.ReportTypes []*ReportType `json:"reportTypes,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListReportTypesResponse: Response message forReportingService.ListReportTypes.
func (ListReportTypesResponse)MarshalJSON¶
func (sListReportTypesResponse) MarshalJSON() ([]byte,error)
typeListReportsResponse¶
type ListReportsResponse struct {// NextPageToken: A token to retrieve next page of results. Pass this value in// the ListReportsRequest.page_token field in the subsequent call to// `ListReports` method to retrieve the next page of results.NextPageTokenstring `json:"nextPageToken,omitempty"`// Reports: The list of report types.Reports []*Report `json:"reports,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ListReportsResponse: Response message for ReportingService.ListReports.
func (ListReportsResponse)MarshalJSON¶
func (sListReportsResponse) 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 Download methods.
func (*MediaDownloadCall)Do¶
func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GdataMedia,error)
Do executes the "youtubereporting.media.download" call.Any non-2xx status code is an error. Response headers are in either*GdataMedia.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because 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#PartialResponse for moredetails.
func (*MediaDownloadCall)Header¶
func (c *MediaDownloadCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*MediaDownloadCall)IfNoneMatch¶
func (c *MediaDownloadCall) IfNoneMatch(entityTagstring) *MediaDownloadCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
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: Method for media download. Download is supported on the URI`/v1/media/{+name}?alt=media`.
- resourceName: Name of the media that is being downloaded.
typeReport¶
type Report struct {// CreateTime: The date/time when this report was created.CreateTimestring `json:"createTime,omitempty"`// DownloadUrl: The URL from which the report can be downloaded (max. 1000// characters).DownloadUrlstring `json:"downloadUrl,omitempty"`// EndTime: The end of the time period that the report instance covers. The// value is exclusive.EndTimestring `json:"endTime,omitempty"`// Id: The server-generated ID of the report.Idstring `json:"id,omitempty"`// JobExpireTime: The date/time when the job this report belongs to will// expire/expired.JobExpireTimestring `json:"jobExpireTime,omitempty"`// JobId: The ID of the job that created this report.JobIdstring `json:"jobId,omitempty"`// StartTime: The start of the time period that the report instance covers. The// value is inclusive.StartTimestring `json:"startTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CreateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CreateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}Report: A report's metadata including the URL from which the report itselfcan be downloaded.
func (Report)MarshalJSON¶
typeReportType¶
type ReportType struct {// DeprecateTime: The date/time when this report type was/will be deprecated.DeprecateTimestring `json:"deprecateTime,omitempty"`// Id: The ID of the report type (max. 100 characters).Idstring `json:"id,omitempty"`// Name: The name of the report type (max. 100 characters).Namestring `json:"name,omitempty"`// SystemManaged: True if this a system-managed report type; otherwise false.// Reporting jobs for system-managed report types are created automatically and// can thus not be used in the `CreateJob` method.SystemManagedbool `json:"systemManaged,omitempty"`// ForceSendFields is a list of field names (e.g. "DeprecateTime") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeprecateTime") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ReportType: A report type.
func (ReportType)MarshalJSON¶
func (sReportType) MarshalJSON() ([]byte,error)
typeReportTypesListCall¶
type ReportTypesListCall struct {// contains filtered or unexported fields}func (*ReportTypesListCall)Context¶
func (c *ReportTypesListCall) Context(ctxcontext.Context) *ReportTypesListCall
Context sets the context to be used in this call's Do method.
func (*ReportTypesListCall)Do¶
func (c *ReportTypesListCall) Do(opts ...googleapi.CallOption) (*ListReportTypesResponse,error)
Do executes the "youtubereporting.reportTypes.list" call.Any non-2xx status code is an error. Response headers are in either*ListReportTypesResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.
func (*ReportTypesListCall)Fields¶
func (c *ReportTypesListCall) Fields(s ...googleapi.Field) *ReportTypesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ReportTypesListCall)Header¶
func (c *ReportTypesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ReportTypesListCall)IfNoneMatch¶
func (c *ReportTypesListCall) IfNoneMatch(entityTagstring) *ReportTypesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*ReportTypesListCall)IncludeSystemManaged¶
func (c *ReportTypesListCall) IncludeSystemManaged(includeSystemManagedbool) *ReportTypesListCall
IncludeSystemManaged sets the optional parameter "includeSystemManaged": Ifset to true, also system-managed report types will be returned; otherwiseonly the report types that can be used to create new reporting jobs will bereturned.
func (*ReportTypesListCall)OnBehalfOfContentOwner¶
func (c *ReportTypesListCall) OnBehalfOfContentOwner(onBehalfOfContentOwnerstring) *ReportTypesListCall
OnBehalfOfContentOwner sets the optional parameter "onBehalfOfContentOwner":The content owner's external ID on which behalf the user is acting on. Ifnot set, the user is acting for himself (his own channel).
func (*ReportTypesListCall)PageSize¶
func (c *ReportTypesListCall) PageSize(pageSizeint64) *ReportTypesListCall
PageSize sets the optional parameter "pageSize": Requested page size. Servermay return fewer report types than requested. If unspecified, server willpick an appropriate default.
func (*ReportTypesListCall)PageToken¶
func (c *ReportTypesListCall) PageToken(pageTokenstring) *ReportTypesListCall
PageToken sets the optional parameter "pageToken": A token identifying apage of results the server should return. Typically, this is the value ofListReportTypesResponse.next_page_token returned in response to the previouscall to the `ListReportTypes` method.
func (*ReportTypesListCall)Pages¶
func (c *ReportTypesListCall) Pages(ctxcontext.Context, f func(*ListReportTypesResponse)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeReportTypesService¶
type ReportTypesService struct {// contains filtered or unexported fields}funcNewReportTypesService¶
func NewReportTypesService(s *Service) *ReportTypesService
func (*ReportTypesService)List¶
func (r *ReportTypesService) List() *ReportTypesListCall
List: Lists report types.
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentJobs *JobsServiceMedia *MediaServiceReportTypes *ReportTypesService// 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¶added inv0.3.0
NewService creates a new Service.