googleapis.youtube.reporting
Module googleapis.youtube.reporting
API
Definitions
ballerinax/googleapis.youtube.reporting Ballerina library
Overview
This is a generated connector for Youtube Reporting API v1 OpenAPI specification. The Youtube Reporting API provides the capability to schedule reporting jobs containing your YouTube Analytics data and download the resulting bulk data reports in the form of CSV files.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a Google account
- Obtain tokens - Follow this link
Clients
googleapis.youtube.reporting: Client
This is a generated connector for Youtube Reporting API v1 OpenAPI specification. The Youtube Reporting API provides the capability to schedule reporting jobs containing your YouTube Analytics data and download the resulting bulk data reports in the form of CSV files.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a Google account and obtain tokens by following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://youtubereporting.googleapis.com/" - URL of the target service
listJobs
function listJobs(string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, boolean? includeSystemManaged, string? onBehalfOfContentOwner, int? pageSize, string? pageToken) returns ListJobsResponse|error
Lists jobs.
Parameters
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- includeSystemManaged boolean? (default ()) - If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be returned. System-managed jobs can neither be modified nor deleted.
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
- pageSize int? (default ()) - Requested page size. Server may return fewer jobs than requested. If unspecified, server will pick an appropriate default.
- pageToken string? (default ()) - A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the
ListJobs
method.
Return Type
- ListJobsResponse|error - Successful response
createJob
function createJob(Job payload, string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, string? onBehalfOfContentOwner) returns Job|error
Creates a job and returns it.
Parameters
- payload Job -
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
getJob
function getJob(string jobId, string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, string? onBehalfOfContentOwner) returns Job|error
Gets a job.
Parameters
- jobId string - The ID of the job to retrieve.
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
deleteJob
function deleteJob(string jobId, string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, string? onBehalfOfContentOwner) returns Response|error
Deletes a job.
Parameters
- jobId string - The ID of the job to delete.
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
listJobReports
function listJobReports(string jobId, string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, string? createdAfter, string? onBehalfOfContentOwner, int? pageSize, string? pageToken, string? startTimeAtOrAfter, string? startTimeBefore) returns ListReportsResponse|error
Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist.
Parameters
- jobId string - The ID of the job.
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- createdAfter string? (default ()) - If set, only reports created after the specified date/time are returned.
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
- pageSize int? (default ()) - Requested page size. Server may return fewer report types than requested. If unspecified, server will pick an appropriate default.
- pageToken string? (default ()) - A token identifying a page of results the server should return. Typically, this is the value of ListReportsResponse.next_page_token returned in response to the previous call to the
ListReports
method.
- startTimeAtOrAfter string? (default ()) - If set, only reports whose start time is greater than or equal the specified date/time are returned.
- startTimeBefore string? (default ()) - If set, only reports whose start time is smaller than the specified date/time are returned.
Return Type
- ListReportsResponse|error - Successful response
getJobReports
function getJobReports(string jobId, string reportId, string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, string? onBehalfOfContentOwner) returns Report|error
Gets the metadata of a specific report.
Parameters
- jobId string - The ID of the job.
- reportId string - The ID of the report to retrieve.
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
downloadMedia
function downloadMedia(string resourceName, string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType) returns GdataMedia|error
Method for media download. Download is supported on the URI /v1/media/{+name}?alt=media
.
Parameters
- resourceName string - Name of the media that is being downloaded.
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
Return Type
- GdataMedia|error - Successful response
listReportTypes
function listReportTypes(string? xgafv, string? alt, string? callback, string? fields, string? quotaUser, string? uploadProtocol, string? uploadType, boolean? includeSystemManaged, string? onBehalfOfContentOwner, int? pageSize, string? pageToken) returns ListReportTypesResponse|error
Lists report types.
Parameters
- xgafv string? (default ()) - V1 error format.
- alt string? (default ()) - Data format for response.
- callback string? (default ()) - JSONP
- fields string? (default ()) - Selector specifying which fields to include in a partial response.
- quotaUser string? (default ()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- uploadProtocol string? (default ()) - Upload protocol for media (e.g. "raw", "multipart").
- uploadType string? (default ()) - Legacy upload protocol for media (e.g. "media", "multipart").
- includeSystemManaged boolean? (default ()) - If set to true, also system-managed report types will be returned; otherwise only the report types that can be used to create new reporting jobs will be returned.
- onBehalfOfContentOwner string? (default ()) - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).
- pageSize int? (default ()) - Requested page size. Server may return fewer report types than requested. If unspecified, server will pick an appropriate default.
- pageToken string? (default ()) - A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the
ListReportTypes
method.
Return Type
- ListReportTypesResponse|error - Successful response
Records
googleapis.youtube.reporting: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
googleapis.youtube.reporting: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
googleapis.youtube.reporting: GdataBlobstore2Info
gdata
Fields
- blobGeneration string? - gdata
- blobId string? - gdata
- downloadReadHandle string? - gdata
- readToken string? - gdata
- uploadMetadataContainer string? - gdata
googleapis.youtube.reporting: GdataCompositeMedia
gdata
Fields
- blobRef string? - gdata
- blobstore2Info GdataBlobstore2Info? - gdata
- cosmoBinaryReference string? - gdata
- crc32cHash int? - gdata
- inline string? - gdata
- length string? - gdata
- md5Hash string? - gdata
- objectId GdataObjectId? - gdata
- path string? - gdata
- referenceType string? - gdata
- sha1Hash string? - gdata
googleapis.youtube.reporting: GdataContentTypeInfo
gdata
Fields
- bestGuess string? - gdata
- fromBytes string? - gdata
- fromFileName string? - gdata
- fromHeader string? - gdata
- fromUrlPath string? - gdata
googleapis.youtube.reporting: GdataDiffChecksumsResponse
gdata
Fields
- checksumsLocation GdataCompositeMedia? - gdata
- chunkSizeBytes string? - gdata
- objectLocation GdataCompositeMedia? - gdata
- objectSizeBytes string? - gdata
- objectVersion string? - gdata
googleapis.youtube.reporting: GdataDiffDownloadResponse
gdata
Fields
- objectLocation GdataCompositeMedia? - gdata
googleapis.youtube.reporting: GdataDiffUploadRequest
gdata
Fields
- checksumsInfo GdataCompositeMedia? - gdata
- objectInfo GdataCompositeMedia? - gdata
- objectVersion string? - gdata
googleapis.youtube.reporting: GdataDiffUploadResponse
gdata
Fields
- objectVersion string? - gdata
- originalObject GdataCompositeMedia? - gdata
googleapis.youtube.reporting: GdataDiffVersionResponse
gdata
Fields
- objectSizeBytes string? - gdata
- objectVersion string? - gdata
googleapis.youtube.reporting: GdataDownloadParameters
gdata
Fields
- allowGzipCompression boolean? - gdata
- ignoreRange boolean? - gdata
googleapis.youtube.reporting: GdataMedia
gdata
Fields
- algorithm string? - gdata
- bigstoreObjectRef string? - gdata
- blobRef string? - gdata
- blobstore2Info GdataBlobstore2Info? - gdata
- compositeMedia GdataCompositeMedia[]? - gdata
- contentType string? - gdata
- contentTypeInfo GdataContentTypeInfo? - gdata
- cosmoBinaryReference string? - gdata
- crc32cHash int? - gdata
- diffChecksumsResponse GdataDiffChecksumsResponse? - gdata
- diffDownloadResponse GdataDiffDownloadResponse? - gdata
- diffUploadRequest GdataDiffUploadRequest? - gdata
- diffUploadResponse GdataDiffUploadResponse? - gdata
- diffVersionResponse GdataDiffVersionResponse? - gdata
- downloadParameters GdataDownloadParameters? - gdata
- filename string? - gdata
- hash string? - gdata
- hashVerified boolean? - gdata
- inline string? - gdata
- isPotentialRetry boolean? - gdata
- length string? - gdata
- md5Hash string? - gdata
- mediaId string? - gdata
- objectId GdataObjectId? - gdata
- path string? - gdata
- referenceType string? - gdata
- sha1Hash string? - gdata
- sha256Hash string? - gdata
- timestamp string? - gdata
- token string? - gdata
googleapis.youtube.reporting: GdataObjectId
gdata
Fields
- bucketName string? - gdata
- generation string? - gdata
- objectName string? - gdata
googleapis.youtube.reporting: Job
A job creating reports of a specific type.
Fields
- createTime string? - The creation date/time of the job.
- expireTime string? - The date/time when this job will expire/expired. After a job expired, no new reports are generated.
- id string? - The server-generated ID of the job (max. 40 characters).
- name string? - The name of the job (max. 100 characters).
- reportTypeId string? - The type of reports this job creates. Corresponds to the ID of a ReportType.
- systemManaged boolean? - True if this a system-managed job that cannot be modified by the user; otherwise false.
googleapis.youtube.reporting: ListJobsResponse
Response message for ReportingService.ListJobs.
Fields
- jobs Job[]? - The list of jobs.
- nextPageToken string? - 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.
googleapis.youtube.reporting: ListReportsResponse
Response message for ReportingService.ListReports.
Fields
- nextPageToken string? - 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.
- reports Report[]? - The list of report types.
googleapis.youtube.reporting: ListReportTypesResponse
Response message for ReportingService.ListReportTypes.
Fields
- nextPageToken string? - 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.
- reportTypes ReportType[]? - The list of report types.
googleapis.youtube.reporting: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://accounts.google.com/o/oauth2/token") - Refresh URL
googleapis.youtube.reporting: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
googleapis.youtube.reporting: Report
A report's metadata including the URL from which the report itself can be downloaded.
Fields
- createTime string? - The date/time when this report was created.
- downloadUrl string? - The URL from which the report can be downloaded (max. 1000 characters).
- endTime string? - The end of the time period that the report instance covers. The value is exclusive.
- id string? - The server-generated ID of the report.
- jobExpireTime string? - The date/time when the job this report belongs to will expire/expired.
- jobId string? - The ID of the job that created this report.
- startTime string? - The start of the time period that the report instance covers. The value is inclusive.
googleapis.youtube.reporting: ReportType
A report type.
Fields
- deprecateTime string? - The date/time when this report type was/will be deprecated.
- id string? - The ID of the report type (max. 100 characters).
- name string? - The name of the report type (max. 100 characters).
- systemManaged boolean? - 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.
Import
import ballerinax/googleapis.youtube.reporting;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Business Intelligence/Reporting
Cost/Free
Vendor/Google
Contributors
Dependencies