googleapis.youtube.reporting
Module googleapis.youtube.reporting
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_googleapis.youtube.reporting_1.1.0.png)
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![](/images/permalink.svg)
googleapis.youtube.reporting: Client![](/images/permalink.svg)
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![](/images/permalink.svg)
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 (ClientConfig clientConfig, string serviceUrl)
- clientConfig ClientConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://youtubereporting.googleapis.com/" - URL of the target service
listJobs![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
googleapis.youtube.reporting: ClientConfig![](/images/permalink.svg)
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 string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - 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
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
googleapis.youtube.reporting: GdataBlobstore2Info![](/images/permalink.svg)
gdata
Fields
- blobGeneration string? - gdata
- blobId string? - gdata
- downloadReadHandle string? - gdata
- readToken string? - gdata
- uploadMetadataContainer string? - gdata
googleapis.youtube.reporting: GdataCompositeMedia![](/images/permalink.svg)
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![](/images/permalink.svg)
gdata
Fields
- bestGuess string? - gdata
- fromBytes string? - gdata
- fromFileName string? - gdata
- fromHeader string? - gdata
- fromUrlPath string? - gdata
googleapis.youtube.reporting: GdataDiffChecksumsResponse![](/images/permalink.svg)
gdata
Fields
- checksumsLocation GdataCompositeMedia? - gdata
- chunkSizeBytes string? - gdata
- objectLocation GdataCompositeMedia? - gdata
- objectSizeBytes string? - gdata
- objectVersion string? - gdata
googleapis.youtube.reporting: GdataDiffDownloadResponse![](/images/permalink.svg)
gdata
Fields
- objectLocation GdataCompositeMedia? - gdata
googleapis.youtube.reporting: GdataDiffUploadRequest![](/images/permalink.svg)
gdata
Fields
- checksumsInfo GdataCompositeMedia? - gdata
- objectInfo GdataCompositeMedia? - gdata
- objectVersion string? - gdata
googleapis.youtube.reporting: GdataDiffUploadResponse![](/images/permalink.svg)
gdata
Fields
- objectVersion string? - gdata
- originalObject GdataCompositeMedia? - gdata
googleapis.youtube.reporting: GdataDiffVersionResponse![](/images/permalink.svg)
gdata
Fields
- objectSizeBytes string? - gdata
- objectVersion string? - gdata
googleapis.youtube.reporting: GdataDownloadParameters![](/images/permalink.svg)
gdata
Fields
- allowGzipCompression boolean? - gdata
- ignoreRange boolean? - gdata
googleapis.youtube.reporting: GdataMedia![](/images/permalink.svg)
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![](/images/permalink.svg)
gdata
Fields
- bucketName string? - gdata
- generation string? - gdata
- objectName string? - gdata
googleapis.youtube.reporting: Job![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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: Report![](/images/permalink.svg)
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![](/images/permalink.svg)
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 2 years ago
Version: 1.1.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: slbeta6
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Business Intelligence/Reporting
Cost/Free
Vendor/Google
Contributors
Dependencies