vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+68 -58
View File
@@ -1,12 +1,12 @@
{
"kind": "discovery#restDescription",
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/f81k8b4sv9uLeywfoj2KpL2xcPg\"",
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/AIWw-yWxHTNchYNbx8LfngbqcZ8\"",
"discoveryVersion": "v1",
"id": "youtube:v3",
"name": "youtube",
"canonicalName": "YouTube",
"version": "v3",
"revision": "20170130",
"revision": "20170918",
"title": "YouTube Data API",
"description": "Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.",
"ownerDomain": "google.com",
@@ -21,7 +21,7 @@
"basePath": "/youtube/v3/",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "youtube/v3/",
"batchPath": "batch",
"batchPath": "batch/youtube/v3",
"parameters": {
"alt": {
"type": "string",
@@ -1771,7 +1771,7 @@
"ContentRating": {
"id": "ContentRating",
"type": "object",
"description": "Ratings schemes. The country-specific ratings are mostly for movies and shows. NEXT_ID: 69",
"description": "Ratings schemes. The country-specific ratings are mostly for movies and shows. NEXT_ID: 71",
"properties": {
"acbRating": {
"type": "string",
@@ -2807,6 +2807,24 @@
""
]
},
"menaMpaaRating": {
"type": "string",
"description": "The rating system for MENA countries, a clone of MPAA. It is needed to",
"enum": [
"menaMpaaG",
"menaMpaaPg",
"menaMpaaPg13",
"menaMpaaR",
"menaMpaaUnrated"
],
"enumDescriptions": [
"",
"",
"",
"",
""
]
},
"mibacRating": {
"type": "string",
"description": "The video's rating from the Ministero dei Beni e delle Attività Culturali e del Turismo (Italy).",
@@ -2895,6 +2913,18 @@
""
]
},
"mpaatRating": {
"type": "string",
"description": "The rating system for trailer, DVD, and Ad in the US. See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html.",
"enum": [
"mpaatGb",
"mpaatRb"
],
"enumDescriptions": [
"",
""
]
},
"mtrcbRating": {
"type": "string",
"description": "The video's rating from the Movie and Television Review and Classification Board (Philippines).",
@@ -3879,9 +3909,6 @@
"status": {
"$ref": "LiveBroadcastStatus",
"description": "The status object contains information about the event's status."
},
"topicDetails": {
"$ref": "LiveBroadcastTopicDetails"
}
}
},
@@ -3947,6 +3974,24 @@
"type": "boolean",
"description": "Indicates whether this broadcast has low latency enabled."
},
"latencyPreference": {
"type": "string",
"description": "If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted.",
"enum": [
"low",
"normal",
"ultraLow"
],
"enumDescriptions": [
"",
"",
""
]
},
"mesh": {
"type": "string",
"format": "byte"
},
"monitorStream": {
"$ref": "MonitorStreamInfo",
"description": "The monitorStream object contains information about the monitor stream, which the broadcaster can use to review the event content before the broadcast stream is shown publicly."
@@ -3956,9 +4001,11 @@
"description": "The projection format of this broadcast. This defaults to rectangular.",
"enum": [
"360",
"mesh",
"rectangular"
],
"enumDescriptions": [
"",
"",
""
]
@@ -4194,56 +4241,6 @@
}
}
},
"LiveBroadcastTopic": {
"id": "LiveBroadcastTopic",
"type": "object",
"properties": {
"snippet": {
"$ref": "LiveBroadcastTopicSnippet",
"description": "Information about the topic matched."
},
"type": {
"type": "string",
"description": "The type of the topic.",
"enum": [
"videoGame"
],
"enumDescriptions": [
""
]
},
"unmatched": {
"type": "boolean",
"description": "If this flag is set it means that we have not been able to match the topic title and type provided to a known entity."
}
}
},
"LiveBroadcastTopicDetails": {
"id": "LiveBroadcastTopicDetails",
"type": "object",
"properties": {
"topics": {
"type": "array",
"items": {
"$ref": "LiveBroadcastTopic"
}
}
}
},
"LiveBroadcastTopicSnippet": {
"id": "LiveBroadcastTopicSnippet",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the topic."
},
"releaseDate": {
"type": "string",
"description": "The date at which the topic was released. Filled for types: videoGame"
}
}
},
"LiveChatBan": {
"id": "LiveChatBan",
"type": "object",
@@ -7307,6 +7304,7 @@
"items": {
"type": "string",
"enum": [
"hdrVideo",
"nonStreamableMov",
"sendBestQualityVideo",
"spatialAudio",
@@ -7318,6 +7316,7 @@
"",
"",
"",
"",
""
]
}
@@ -7331,10 +7330,13 @@
"hasEditlist",
"inconsistentResolution",
"problematicAudioCodec",
"problematicHdrLookupTable",
"problematicVideoCodec",
"unknownAudioCodec",
"unknownContainer",
"unknownVideoCodec",
"unsupportedHdrColorMetadata",
"unsupportedHdrPixelFormat",
"unsupportedSphericalProjectionType",
"unsupportedVrStereoMode"
],
@@ -7347,6 +7349,9 @@
"",
"",
"",
"",
"",
"",
""
]
}
@@ -7796,6 +7801,11 @@
"httpMethod": "POST",
"description": "Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel:\n\n- Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels.\n- Extract the url property's value from the response that the API returns for step 1.\n- Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2.",
"parameters": {
"channelId": {
"type": "string",
"description": "The channelId parameter identifies the YouTube channel to which the banner is uploaded. The channelId parameter was introduced as a required parameter in May 2017. As this was a backward-incompatible change, channelBanners.insert requests that do not specify this parameter will not return an error until six months have passed from the time that the parameter was introduced. Please see the API Terms of Service for the official policy regarding backward incompatible changes and the API revision history for the exact date that the parameter was introduced.",
"location": "query"
},
"onBehalfOfContentOwner": {
"type": "string",
"description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
@@ -10291,7 +10301,7 @@
"description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.",
"default": "5",
"format": "uint32",
"minimum": "0",
"minimum": "1",
"maximum": "50",
"location": "query"
},
+155 -398
View File
@@ -2802,7 +2802,7 @@ func (s *CommentThreadSnippet) MarshalJSON() ([]byte, error) {
}
// ContentRating: Ratings schemes. The country-specific ratings are
// mostly for movies and shows. NEXT_ID: 69
// mostly for movies and shows. NEXT_ID: 71
type ContentRating struct {
// AcbRating: The video's Australian Classification Board (ACB) or
// Australian Communications and Media Authority (ACMA) rating. ACMA
@@ -3408,6 +3408,17 @@ type ContentRating struct {
// "mekuUnrated"
MekuRating string `json:"mekuRating,omitempty"`
// MenaMpaaRating: The rating system for MENA countries, a clone of
// MPAA. It is needed to
//
// Possible values:
// "menaMpaaG"
// "menaMpaaPg"
// "menaMpaaPg13"
// "menaMpaaR"
// "menaMpaaUnrated"
MenaMpaaRating string `json:"menaMpaaRating,omitempty"`
// MibacRating: The video's rating from the Ministero dei Beni e delle
// Attività Culturali e del Turismo (Italy).
//
@@ -3459,6 +3470,14 @@ type ContentRating struct {
// "mpaaUnrated"
MpaaRating string `json:"mpaaRating,omitempty"`
// MpaatRating: The rating system for trailer, DVD, and Ad in the US.
// See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html.
//
// Possible values:
// "mpaatGb"
// "mpaatRb"
MpaatRating string `json:"mpaatRating,omitempty"`
// MtrcbRating: The video's rating from the Movie and Television Review
// and Classification Board (Philippines).
//
@@ -4659,8 +4678,6 @@ type LiveBroadcast struct {
// status.
Status *LiveBroadcastStatus `json:"status,omitempty"`
TopicDetails *LiveBroadcastTopicDetails `json:"topicDetails,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@@ -4740,6 +4757,19 @@ type LiveBroadcastContentDetails struct {
// enabled.
EnableLowLatency bool `json:"enableLowLatency,omitempty"`
// LatencyPreference: If both this and enable_low_latency are set, they
// must match. LATENCY_NORMAL should match enable_low_latency=false
// LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW
// should have enable_low_latency omitted.
//
// Possible values:
// "low"
// "normal"
// "ultraLow"
LatencyPreference string `json:"latencyPreference,omitempty"`
Mesh string `json:"mesh,omitempty"`
// MonitorStream: The monitorStream object contains information about
// the monitor stream, which the broadcaster can use to review the event
// content before the broadcast stream is shown publicly.
@@ -4750,6 +4780,7 @@ type LiveBroadcastContentDetails struct {
//
// Possible values:
// "360"
// "mesh"
// "rectangular"
Projection string `json:"projection,omitempty"`
@@ -5047,100 +5078,6 @@ func (s *LiveBroadcastStatus) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type LiveBroadcastTopic struct {
// Snippet: Information about the topic matched.
Snippet *LiveBroadcastTopicSnippet `json:"snippet,omitempty"`
// Type: The type of the topic.
//
// Possible values:
// "videoGame"
Type string `json:"type,omitempty"`
// Unmatched: If this flag is set it means that we have not been able to
// match the topic title and type provided to a known entity.
Unmatched bool `json:"unmatched,omitempty"`
// ForceSendFields is a list of field names (e.g. "Snippet") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Snippet") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *LiveBroadcastTopic) MarshalJSON() ([]byte, error) {
type noMethod LiveBroadcastTopic
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type LiveBroadcastTopicDetails struct {
Topics []*LiveBroadcastTopic `json:"topics,omitempty"`
// ForceSendFields is a list of field names (e.g. "Topics") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Topics") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *LiveBroadcastTopicDetails) MarshalJSON() ([]byte, error) {
type noMethod LiveBroadcastTopicDetails
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type LiveBroadcastTopicSnippet struct {
// Name: The name of the topic.
Name string `json:"name,omitempty"`
// ReleaseDate: The date at which the topic was released. Filled for
// types: videoGame
ReleaseDate string `json:"releaseDate,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *LiveBroadcastTopicSnippet) MarshalJSON() ([]byte, error) {
type noMethod LiveBroadcastTopicSnippet
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// LiveChatBan: A liveChatBan resource represents a ban for a YouTube
// live chat.
type LiveChatBan struct {
@@ -9594,6 +9531,7 @@ type VideoSuggestions struct {
// ability to process the video.
//
// Possible values:
// "hdrVideo"
// "nonStreamableMov"
// "sendBestQualityVideo"
// "spatialAudio"
@@ -9613,10 +9551,13 @@ type VideoSuggestions struct {
// "hasEditlist"
// "inconsistentResolution"
// "problematicAudioCodec"
// "problematicHdrLookupTable"
// "problematicVideoCodec"
// "unknownAudioCodec"
// "unknownContainer"
// "unknownVideoCodec"
// "unsupportedHdrColorMetadata"
// "unsupportedHdrPixelFormat"
// "unsupportedSphericalProjectionType"
// "unsupportedVrStereoMode"
ProcessingWarnings []string `json:"processingWarnings,omitempty"`
@@ -10536,16 +10477,12 @@ func (c *CaptionsDownloadCall) Do(opts ...googleapi.CallOption) error {
// method id "youtube.captions.insert":
type CaptionsInsertCall struct {
s *Service
caption *Caption
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
ctx_ context.Context
header_ http.Header
s *Service
caption *Caption
urlParams_ gensupport.URLParams
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
// Insert: Uploads a caption track.
@@ -10605,12 +10542,7 @@ func (c *CaptionsInsertCall) Sync(sync bool) *CaptionsInsertCall {
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsInsertCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@@ -10625,11 +10557,7 @@ func (c *CaptionsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption
// supersede any context previously provided to the Context method.
func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsInsertCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@@ -10638,7 +10566,7 @@ func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt,
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *CaptionsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsInsertCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@@ -10683,27 +10611,16 @@ func (c *CaptionsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "captions")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
@@ -10736,20 +10653,10 @@ func (c *CaptionsInsertCall) Do(opts ...googleapi.CallOption) (*Caption, error)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()
@@ -11036,16 +10943,12 @@ func (c *CaptionsListCall) Do(opts ...googleapi.CallOption) (*CaptionListRespons
// method id "youtube.captions.update":
type CaptionsUpdateCall struct {
s *Service
caption *Caption
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
ctx_ context.Context
header_ http.Header
s *Service
caption *Caption
urlParams_ gensupport.URLParams
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
// Update: Updates a caption track. When updating a caption track, you
@@ -11106,12 +11009,7 @@ func (c *CaptionsUpdateCall) Sync(sync bool) *CaptionsUpdateCall {
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *CaptionsUpdateCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@@ -11126,11 +11024,7 @@ func (c *CaptionsUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption
// supersede any context previously provided to the Context method.
func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsUpdateCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@@ -11139,7 +11033,7 @@ func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt,
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *CaptionsUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CaptionsUpdateCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@@ -11184,27 +11078,16 @@ func (c *CaptionsUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "captions")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
req.Header = reqHeaders
@@ -11237,20 +11120,10 @@ func (c *CaptionsUpdateCall) Do(opts ...googleapi.CallOption) (*Caption, error)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()
@@ -11345,11 +11218,7 @@ type ChannelBannersInsertCall struct {
s *Service
channelbannerresource *ChannelBannerResource
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
@@ -11372,6 +11241,21 @@ func (r *ChannelBannersService) Insert(channelbannerresource *ChannelBannerResou
return c
}
// ChannelId sets the optional parameter "channelId": The channelId
// parameter identifies the YouTube channel to which the banner is
// uploaded. The channelId parameter was introduced as a required
// parameter in May 2017. As this was a backward-incompatible change,
// channelBanners.insert requests that do not specify this parameter
// will not return an error until six months have passed from the time
// that the parameter was introduced. Please see the API Terms of
// Service for the official policy regarding backward incompatible
// changes and the API revision history for the exact date that the
// parameter was introduced.
func (c *ChannelBannersInsertCall) ChannelId(channelId string) *ChannelBannersInsertCall {
c.urlParams_.Set("channelId", channelId)
return c
}
// OnBehalfOfContentOwner sets the optional parameter
// "onBehalfOfContentOwner": Note: This parameter is intended
// exclusively for YouTube content partners.
@@ -11399,12 +11283,7 @@ func (c *ChannelBannersInsertCall) OnBehalfOfContentOwner(onBehalfOfContentOwner
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ChannelBannersInsertCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@@ -11419,11 +11298,7 @@ func (c *ChannelBannersInsertCall) Media(r io.Reader, options ...googleapi.Media
// supersede any context previously provided to the Context method.
func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ChannelBannersInsertCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@@ -11432,7 +11307,7 @@ func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.Read
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *ChannelBannersInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ChannelBannersInsertCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@@ -11477,27 +11352,16 @@ func (c *ChannelBannersInsertCall) doRequest(alt string) (*http.Response, error)
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "channelBanners/insert")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
@@ -11530,20 +11394,10 @@ func (c *ChannelBannersInsertCall) Do(opts ...googleapi.CallOption) (*ChannelBan
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()
@@ -11591,6 +11445,11 @@ func (c *ChannelBannersInsertCall) Do(opts ...googleapi.CallOption) (*ChannelBan
// }
// },
// "parameters": {
// "channelId": {
// "description": "The channelId parameter identifies the YouTube channel to which the banner is uploaded. The channelId parameter was introduced as a required parameter in May 2017. As this was a backward-incompatible change, channelBanners.insert requests that do not specify this parameter will not return an error until six months have passed from the time that the parameter was introduced. Please see the API Terms of Service for the official policy regarding backward incompatible changes and the API revision history for the exact date that the parameter was introduced.",
// "location": "query",
// "type": "string"
// },
// "onBehalfOfContentOwner": {
// "description": "Note: This parameter is intended exclusively for YouTube content partners.\n\nThe onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.",
// "location": "query",
@@ -21467,7 +21326,7 @@ func (c *SuperChatEventsListCall) Do(opts ...googleapi.CallOption) (*SuperChatEv
// "format": "uint32",
// "location": "query",
// "maximum": "50",
// "minimum": "0",
// "minimum": "1",
// "type": "integer"
// },
// "pageToken": {
@@ -21519,15 +21378,11 @@ func (c *SuperChatEventsListCall) Pages(ctx context.Context, f func(*SuperChatEv
// method id "youtube.thumbnails.set":
type ThumbnailsSetCall struct {
s *Service
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
ctx_ context.Context
header_ http.Header
s *Service
urlParams_ gensupport.URLParams
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
// Set: Uploads a custom video thumbnail to YouTube and sets it for a
@@ -21566,12 +21421,7 @@ func (c *ThumbnailsSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *ThumbnailsSetCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@@ -21586,11 +21436,7 @@ func (c *ThumbnailsSetCall) Media(r io.Reader, options ...googleapi.MediaOption)
// supersede any context previously provided to the Context method.
func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ThumbnailsSetCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@@ -21599,7 +21445,7 @@ func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *ThumbnailsSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ThumbnailsSetCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@@ -21639,27 +21485,16 @@ func (c *ThumbnailsSetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "thumbnails/set")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
@@ -21692,20 +21527,10 @@ func (c *ThumbnailsSetCall) Do(opts ...googleapi.CallOption) (*ThumbnailSetRespo
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()
@@ -22389,16 +22214,12 @@ func (c *VideosGetRatingCall) Do(opts ...googleapi.CallOption) (*VideoGetRatingR
// method id "youtube.videos.insert":
type VideosInsertCall struct {
s *Service
video *Video
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
ctx_ context.Context
header_ http.Header
s *Service
video *Video
urlParams_ gensupport.URLParams
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
// Insert: Uploads a video to YouTube and optionally sets the video's
@@ -22492,12 +22313,7 @@ func (c *VideosInsertCall) Stabilize(stabilize bool) *VideosInsertCall {
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *VideosInsertCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@@ -22512,11 +22328,7 @@ func (c *VideosInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
// supersede any context previously provided to the Context method.
func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *VideosInsertCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@@ -22525,7 +22337,7 @@ func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, si
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *VideosInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *VideosInsertCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@@ -22570,27 +22382,16 @@ func (c *VideosInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "videos")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
@@ -22623,20 +22424,10 @@ func (c *VideosInsertCall) Do(opts ...googleapi.CallOption) (*Video, error) {
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()
@@ -23500,16 +23291,12 @@ func (c *VideosUpdateCall) Do(opts ...googleapi.CallOption) (*Video, error) {
// method id "youtube.watermarks.set":
type WatermarksSetCall struct {
s *Service
invideobranding *InvideoBranding
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
ctx_ context.Context
header_ http.Header
s *Service
invideobranding *InvideoBranding
urlParams_ gensupport.URLParams
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
// Set: Uploads a watermark image to YouTube and sets it for a channel.
@@ -23547,12 +23334,7 @@ func (c *WatermarksSetCall) OnBehalfOfContentOwner(onBehalfOfContentOwner string
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption) *WatermarksSetCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@@ -23567,11 +23349,7 @@ func (c *WatermarksSetCall) Media(r io.Reader, options ...googleapi.MediaOption)
// supersede any context previously provided to the Context method.
func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *WatermarksSetCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@@ -23580,7 +23358,7 @@ func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *WatermarksSetCall) ProgressUpdater(pu googleapi.ProgressUpdater) *WatermarksSetCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@@ -23625,27 +23403,16 @@ func (c *WatermarksSetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "watermarks/set")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
@@ -23663,20 +23430,10 @@ func (c *WatermarksSetCall) Do(opts ...googleapi.CallOption) error {
if err := googleapi.CheckResponse(res); err != nil {
return err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()