mirror of
https://github.com/restic/restic.git
synced 2025-12-16 05:23:24 +00:00
Update dependencies
This commit is contained in:
8
vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-api.json
generated
vendored
8
vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-api.json
generated
vendored
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/jAh44-3E4QU-_OC0i2RcuiwRQzw\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/LIbYVZb_4AVNYXTI7gW6jjbQKZE\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "androidpublisher:v1.1",
|
||||
"name": "androidpublisher",
|
||||
"canonicalName": "Android Publisher",
|
||||
"version": "v1.1",
|
||||
"revision": "20170504",
|
||||
"revision": "20170815",
|
||||
"title": "Google Play Developer API",
|
||||
"description": "Lets Android application developers access their Google Play accounts.",
|
||||
"ownerDomain": "google.com",
|
||||
@@ -96,6 +96,10 @@
|
||||
"description": "This kind represents an inappPurchase object in the androidpublisher service.",
|
||||
"default": "androidpublisher#inappPurchase"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "string",
|
||||
"description": "The order id associated with the purchase of the inapp product."
|
||||
},
|
||||
"purchaseState": {
|
||||
"type": "integer",
|
||||
"description": "The purchase state of the order. Possible values are: \n- Purchased \n- Cancelled",
|
||||
|
||||
4
vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-gen.go
generated
vendored
4
vendor/google.golang.org/api/androidpublisher/v1.1/androidpublisher-gen.go
generated
vendored
@@ -113,6 +113,10 @@ type InappPurchase struct {
|
||||
// androidpublisher service.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// OrderId: The order id associated with the purchase of the inapp
|
||||
// product.
|
||||
OrderId string `json:"orderId,omitempty"`
|
||||
|
||||
// PurchaseState: The purchase state of the order. Possible values are:
|
||||
//
|
||||
// - Purchased
|
||||
|
||||
4
vendor/google.golang.org/api/androidpublisher/v1/androidpublisher-api.json
generated
vendored
4
vendor/google.golang.org/api/androidpublisher/v1/androidpublisher-api.json
generated
vendored
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JYnXSSeS9snUxwUvBiIlGUwDhtI\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/GFmAPKnOg_ftPo6thNMuQykGE_I\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "androidpublisher:v1",
|
||||
"name": "androidpublisher",
|
||||
"canonicalName": "Android Publisher",
|
||||
"version": "v1",
|
||||
"revision": "20170504",
|
||||
"revision": "20170815",
|
||||
"title": "Google Play Developer API",
|
||||
"description": "Lets Android application developers access their Google Play accounts.",
|
||||
"ownerDomain": "google.com",
|
||||
|
||||
22
vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-api.json
generated
vendored
22
vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-api.json
generated
vendored
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"kind": "discovery#restDescription",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/fkMKFYhAB3V0ia83SVxm8xZB5LU\"",
|
||||
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/e4AtolObWHB9RMWbWiGGnmazpNA\"",
|
||||
"discoveryVersion": "v1",
|
||||
"id": "androidpublisher:v2",
|
||||
"name": "androidpublisher",
|
||||
"canonicalName": "Android Publisher",
|
||||
"version": "v2",
|
||||
"revision": "20170504",
|
||||
"revision": "20170815",
|
||||
"title": "Google Play Developer API",
|
||||
"description": "Lets Android application developers access their Google Play accounts.",
|
||||
"ownerDomain": "google.com",
|
||||
@@ -100,6 +100,10 @@
|
||||
"sha1": {
|
||||
"type": "string",
|
||||
"description": "A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command."
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"description": "A sha256 hash of the APK payload, encoded as a hex string and matching the output of the sha256sum command."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -830,6 +834,10 @@
|
||||
"description": "This kind represents an inappPurchase object in the androidpublisher service.",
|
||||
"default": "androidpublisher#productPurchase"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "string",
|
||||
"description": "The order id associated with the purchase of the inapp product."
|
||||
},
|
||||
"purchaseState": {
|
||||
"type": "integer",
|
||||
"description": "The purchase state of the order. Possible values are: \n- Purchased \n- Cancelled",
|
||||
@@ -998,9 +1006,13 @@
|
||||
"description": "This kind represents a subscriptionPurchase object in the androidpublisher service.",
|
||||
"default": "androidpublisher#subscriptionPurchase"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "string",
|
||||
"description": "The order id of the latest recurring order associated with the purchase of the subscription."
|
||||
},
|
||||
"paymentState": {
|
||||
"type": "integer",
|
||||
"description": "The payment state of the subscription. Possible values are: \n- Payment pending \n- Payment received",
|
||||
"description": "The payment state of the subscription. Possible values are: \n- Payment pending \n- Payment received \n- Free trial",
|
||||
"format": "int32"
|
||||
},
|
||||
"priceAmountMicros": {
|
||||
@@ -3491,7 +3503,7 @@
|
||||
"parameters": {
|
||||
"endTime": {
|
||||
"type": "string",
|
||||
"description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time.",
|
||||
"description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
@@ -3513,7 +3525,7 @@
|
||||
},
|
||||
"startTime": {
|
||||
"type": "string",
|
||||
"description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days.",
|
||||
"description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.",
|
||||
"format": "int64",
|
||||
"location": "query"
|
||||
},
|
||||
|
||||
287
vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-gen.go
generated
vendored
287
vendor/google.golang.org/api/androidpublisher/v2/androidpublisher-gen.go
generated
vendored
@@ -317,6 +317,10 @@ type ApkBinary struct {
|
||||
// matching the output of the sha1sum command.
|
||||
Sha1 string `json:"sha1,omitempty"`
|
||||
|
||||
// Sha256: A sha256 hash of the APK payload, encoded as a hex string and
|
||||
// matching the output of the sha256sum command.
|
||||
Sha256 string `json:"sha256,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Sha1") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
@@ -1696,6 +1700,10 @@ type ProductPurchase struct {
|
||||
// androidpublisher service.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// OrderId: The order id associated with the purchase of the inapp
|
||||
// product.
|
||||
OrderId string `json:"orderId,omitempty"`
|
||||
|
||||
// PurchaseState: The purchase state of the order. Possible values are:
|
||||
//
|
||||
// - Purchased
|
||||
@@ -2032,10 +2040,15 @@ type SubscriptionPurchase struct {
|
||||
// androidpublisher service.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
|
||||
// OrderId: The order id of the latest recurring order associated with
|
||||
// the purchase of the subscription.
|
||||
OrderId string `json:"orderId,omitempty"`
|
||||
|
||||
// PaymentState: The payment state of the subscription. Possible values
|
||||
// are:
|
||||
// - Payment pending
|
||||
// - Payment received
|
||||
// - Free trial
|
||||
PaymentState *int64 `json:"paymentState,omitempty"`
|
||||
|
||||
// PriceAmountMicros: Price of the subscription, not including tax.
|
||||
@@ -4325,17 +4338,13 @@ func (c *EditsApksListCall) Do(opts ...googleapi.CallOption) (*ApksListResponse,
|
||||
// method id "androidpublisher.edits.apks.upload":
|
||||
|
||||
type EditsApksUploadCall struct {
|
||||
s *Service
|
||||
packageNameid string
|
||||
editId string
|
||||
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
|
||||
packageNameid string
|
||||
editId string
|
||||
urlParams_ gensupport.URLParams
|
||||
mediaInfo_ *gensupport.MediaInfo
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Upload:
|
||||
@@ -4355,12 +4364,7 @@ func (r *EditsApksService) Upload(packageNameid string, editId string) *EditsApk
|
||||
// supplied.
|
||||
// At most one of Media and ResumableMedia may be set.
|
||||
func (c *EditsApksUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsApksUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -4375,11 +4379,7 @@ func (c *EditsApksUploadCall) Media(r io.Reader, options ...googleapi.MediaOptio
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *EditsApksUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsApksUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -4388,7 +4388,7 @@ func (c *EditsApksUploadCall) 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 *EditsApksUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsApksUploadCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -4428,27 +4428,16 @@ func (c *EditsApksUploadCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks")
|
||||
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
|
||||
@@ -4485,20 +4474,10 @@ func (c *EditsApksUploadCall) Do(opts ...googleapi.CallOption) (*Apk, 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()
|
||||
@@ -4582,11 +4561,7 @@ type EditsDeobfuscationfilesUploadCall struct {
|
||||
apkVersionCode int64
|
||||
deobfuscationFileType string
|
||||
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
|
||||
}
|
||||
@@ -4611,12 +4586,7 @@ func (r *EditsDeobfuscationfilesService) Upload(packageNameid string, editId str
|
||||
// supplied.
|
||||
// At most one of Media and ResumableMedia may be set.
|
||||
func (c *EditsDeobfuscationfilesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsDeobfuscationfilesUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -4631,11 +4601,7 @@ func (c *EditsDeobfuscationfilesUploadCall) Media(r io.Reader, options ...google
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *EditsDeobfuscationfilesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsDeobfuscationfilesUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -4644,7 +4610,7 @@ func (c *EditsDeobfuscationfilesUploadCall) ResumableMedia(ctx context.Context,
|
||||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *EditsDeobfuscationfilesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsDeobfuscationfilesUploadCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -4684,27 +4650,16 @@ func (c *EditsDeobfuscationfilesUploadCall) doRequest(alt string) (*http.Respons
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}")
|
||||
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
|
||||
@@ -4743,20 +4698,10 @@ func (c *EditsDeobfuscationfilesUploadCall) Do(opts ...googleapi.CallOption) (*D
|
||||
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()
|
||||
@@ -5816,11 +5761,7 @@ type EditsExpansionfilesUploadCall struct {
|
||||
apkVersionCode int64
|
||||
expansionFileType string
|
||||
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
|
||||
}
|
||||
@@ -5845,12 +5786,7 @@ func (r *EditsExpansionfilesService) Upload(packageNameid string, editId string,
|
||||
// supplied.
|
||||
// At most one of Media and ResumableMedia may be set.
|
||||
func (c *EditsExpansionfilesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsExpansionfilesUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -5865,11 +5801,7 @@ func (c *EditsExpansionfilesUploadCall) Media(r io.Reader, options ...googleapi.
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *EditsExpansionfilesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsExpansionfilesUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -5878,7 +5810,7 @@ func (c *EditsExpansionfilesUploadCall) ResumableMedia(ctx context.Context, r io
|
||||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *EditsExpansionfilesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsExpansionfilesUploadCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -5918,27 +5850,16 @@ func (c *EditsExpansionfilesUploadCall) doRequest(alt string) (*http.Response, e
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}")
|
||||
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
|
||||
@@ -5977,20 +5898,10 @@ func (c *EditsExpansionfilesUploadCall) Do(opts ...googleapi.CallOption) (*Expan
|
||||
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()
|
||||
@@ -6609,19 +6520,15 @@ func (c *EditsImagesListCall) Do(opts ...googleapi.CallOption) (*ImagesListRespo
|
||||
// method id "androidpublisher.edits.images.upload":
|
||||
|
||||
type EditsImagesUploadCall struct {
|
||||
s *Service
|
||||
packageNameid string
|
||||
editId string
|
||||
language string
|
||||
imageType string
|
||||
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
|
||||
packageNameid string
|
||||
editId string
|
||||
language string
|
||||
imageType string
|
||||
urlParams_ gensupport.URLParams
|
||||
mediaInfo_ *gensupport.MediaInfo
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Upload: Uploads a new image and adds it to the list of images for the
|
||||
@@ -6644,12 +6551,7 @@ func (r *EditsImagesService) Upload(packageNameid string, editId string, languag
|
||||
// supplied.
|
||||
// At most one of Media and ResumableMedia may be set.
|
||||
func (c *EditsImagesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *EditsImagesUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -6664,11 +6566,7 @@ func (c *EditsImagesUploadCall) Media(r io.Reader, options ...googleapi.MediaOpt
|
||||
// supersede any context previously provided to the Context method.
|
||||
func (c *EditsImagesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsImagesUploadCall {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -6677,7 +6575,7 @@ func (c *EditsImagesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderA
|
||||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *EditsImagesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *EditsImagesUploadCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -6717,27 +6615,16 @@ func (c *EditsImagesUploadCall) doRequest(alt string) (*http.Response, error) {
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/edits/{editId}/listings/{language}/{imageType}")
|
||||
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
|
||||
@@ -6776,20 +6663,10 @@ func (c *EditsImagesUploadCall) Do(opts ...googleapi.CallOption) (*ImagesUploadR
|
||||
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()
|
||||
@@ -10901,7 +10778,10 @@ func (r *PurchasesVoidedpurchasesService) List(packageName string) *PurchasesVoi
|
||||
// milliseconds since the Epoch, of the newest voided in-app product
|
||||
// purchase that you want to see in the response. The value of this
|
||||
// parameter cannot be greater than the current time and is ignored if a
|
||||
// pagination token is set. Default value is current time.
|
||||
// pagination token is set. Default value is current time. Note: This
|
||||
// filter is applied on the time at which the record is seen as voided
|
||||
// by our systems and not the actual voided time returned in the
|
||||
// response.
|
||||
func (c *PurchasesVoidedpurchasesListCall) EndTime(endTime int64) *PurchasesVoidedpurchasesListCall {
|
||||
c.urlParams_.Set("endTime", fmt.Sprint(endTime))
|
||||
return c
|
||||
@@ -10923,7 +10803,10 @@ func (c *PurchasesVoidedpurchasesListCall) StartIndex(startIndex int64) *Purchas
|
||||
// milliseconds since the Epoch, of the oldest voided in-app product
|
||||
// purchase that you want to see in the response. The value of this
|
||||
// parameter cannot be older than 30 days and is ignored if a pagination
|
||||
// token is set. Default value is current time minus 30 days.
|
||||
// token is set. Default value is current time minus 30 days. Note: This
|
||||
// filter is applied on the time at which the record is seen as voided
|
||||
// by our systems and not the actual voided time returned in the
|
||||
// response.
|
||||
func (c *PurchasesVoidedpurchasesListCall) StartTime(startTime int64) *PurchasesVoidedpurchasesListCall {
|
||||
c.urlParams_.Set("startTime", fmt.Sprint(startTime))
|
||||
return c
|
||||
@@ -11037,7 +10920,7 @@ func (c *PurchasesVoidedpurchasesListCall) Do(opts ...googleapi.CallOption) (*Vo
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "endTime": {
|
||||
// "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time.",
|
||||
// "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
@@ -11059,7 +10942,7 @@ func (c *PurchasesVoidedpurchasesListCall) Do(opts ...googleapi.CallOption) (*Vo
|
||||
// "type": "integer"
|
||||
// },
|
||||
// "startTime": {
|
||||
// "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days.",
|
||||
// "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.",
|
||||
// "format": "int64",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
|
||||
Reference in New Issue
Block a user