vendor: update all dependencies

* Update all dependencies
  * Remove all `[[constraint]]` from Gopkg.toml
  * Add in the minimum number of `[[override]]` to build
  * Remove go get of github.com/inconshreveable/mousetrap as it is vendored
  * Update docs with new policy on constraints
This commit is contained in:
Nick Craig-Wood
2018-05-05 15:52:24 +01:00
parent 21383877df
commit 6427029c4e
4902 changed files with 1443412 additions and 227278 deletions
@@ -15,7 +15,7 @@
"description": "Lets Android application developers access their Google Play accounts.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/android-publisher",
"etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/Xvb720kj6kaUU3p6XJECzzWJnek\"",
"etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/0bfZdFWLay6o3-v5bg8HgVXuqtg\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/android-16.png",
"x32": "https://www.google.com/images/icons/product/android-32.png"
@@ -60,12 +60,12 @@
"type": "boolean"
},
"quotaUser": {
"description": "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. Overrides userIp if both are provided.",
"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
"location": "query",
"type": "string"
},
"userIp": {
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"description": "Deprecated. Please use quotaUser instead.",
"location": "query",
"type": "string"
}
@@ -189,7 +189,7 @@
}
}
},
"revision": "20180211",
"revision": "20180501",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"InappPurchase": {
@@ -15,7 +15,7 @@
"description": "Lets Android application developers access their Google Play accounts.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/android-publisher",
"etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/R8egrhZl5j6Tk7CLvSpuFNhpTLc\"",
"etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/-QMaQIlD0PaJsUVQz4bP5TProYA\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/android-16.png",
"x32": "https://www.google.com/images/icons/product/android-32.png"
@@ -60,12 +60,12 @@
"type": "boolean"
},
"quotaUser": {
"description": "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. Overrides userIp if both are provided.",
"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
"location": "query",
"type": "string"
},
"userIp": {
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"description": "Deprecated. Please use quotaUser instead.",
"location": "query",
"type": "string"
}
@@ -148,7 +148,7 @@
}
}
},
"revision": "20180121",
"revision": "20180501",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"SubscriptionPurchase": {
+54 -102
View File
@@ -15,7 +15,7 @@
"description": "Lets Android application developers access their Google Play accounts.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/android-publisher",
"etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/JHo8f1I6kYzk10q6NwBbUC9DMxw\"",
"etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/e3MuT7-T4mkaaCQS_qVwD7HvOQ8\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/android-16.png",
"x32": "https://www.google.com/images/icons/product/android-32.png"
@@ -60,12 +60,12 @@
"type": "boolean"
},
"quotaUser": {
"description": "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. Overrides userIp if both are provided.",
"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
"location": "query",
"type": "string"
},
"userIp": {
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"description": "Deprecated. Please use quotaUser instead.",
"location": "query",
"type": "string"
}
@@ -1519,9 +1519,9 @@
"type": "string"
},
"track": {
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
"location": "path",
"pattern": "(alpha|beta|production|rollout)",
"pattern": "(alpha|beta|production|rollout|internal)",
"required": true,
"type": "string"
}
@@ -1556,9 +1556,9 @@
"type": "string"
},
"track": {
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
"location": "path",
"pattern": "(alpha|beta|production|rollout)",
"pattern": "(alpha|beta|production|rollout|internal)",
"required": true,
"type": "string"
}
@@ -1596,9 +1596,9 @@
"type": "string"
},
"track": {
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
"location": "path",
"pattern": "(alpha|beta|production|rollout)",
"pattern": "(alpha|beta|production|rollout|internal)",
"required": true,
"type": "string"
}
@@ -1641,9 +1641,8 @@
"type": "string"
},
"track": {
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "The track to read or modify.",
"location": "path",
"pattern": "(alpha|beta|production|rollout)",
"required": true,
"type": "string"
}
@@ -1709,9 +1708,8 @@
"type": "string"
},
"track": {
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "The track to read or modify.",
"location": "path",
"pattern": "(alpha|beta|production|rollout)",
"required": true,
"type": "string"
}
@@ -1750,9 +1748,8 @@
"type": "string"
},
"track": {
"description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "The track to read or modify.",
"location": "path",
"pattern": "(alpha|beta|production|rollout)",
"required": true,
"type": "string"
}
@@ -1772,49 +1769,6 @@
}
}
},
"entitlements": {
"methods": {
"list": {
"description": "Lists the user's current inapp item or subscription entitlements",
"httpMethod": "GET",
"id": "androidpublisher.entitlements.list",
"parameterOrder": [
"packageName"
],
"parameters": {
"maxResults": {
"format": "uint32",
"location": "query",
"type": "integer"
},
"packageName": {
"description": "The package name of the application the inapp product was sold in (for example, 'com.some.thing').",
"location": "path",
"required": true,
"type": "string"
},
"productId": {
"description": "The product id of the inapp product (for example, 'sku1'). This can be used to restrict the result set.",
"location": "query",
"type": "string"
},
"startIndex": {
"format": "uint32",
"location": "query",
"type": "integer"
},
"token": {
"location": "query",
"type": "string"
}
},
"path": "{packageName}/entitlements",
"response": {
"$ref": "EntitlementsListResponse"
}
}
}
},
"inappproducts": {
"methods": {
"delete": {
@@ -2411,7 +2365,7 @@
}
}
},
"revision": "20180211",
"revision": "20180501",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"Apk": {
@@ -2652,48 +2606,6 @@
},
"type": "object"
},
"Entitlement": {
"description": "An Entitlement resource indicates a user's current entitlement to an inapp item or subscription.",
"id": "Entitlement",
"properties": {
"kind": {
"default": "androidpublisher#entitlement",
"description": "This kind represents an entitlement object in the androidpublisher service.",
"type": "string"
},
"productId": {
"description": "The SKU of the product.",
"type": "string"
},
"productType": {
"description": "The type of the inapp product. Possible values are: \n- In-app item: \"inapp\" \n- Subscription: \"subs\"",
"type": "string"
},
"token": {
"description": "The token which can be verified using the subscriptions or products API.",
"type": "string"
}
},
"type": "object"
},
"EntitlementsListResponse": {
"id": "EntitlementsListResponse",
"properties": {
"pageInfo": {
"$ref": "PageInfo"
},
"resources": {
"items": {
"$ref": "Entitlement"
},
"type": "array"
},
"tokenPagination": {
"$ref": "TokenPagination"
}
},
"type": "object"
},
"ExpansionFile": {
"id": "ExpansionFile",
"properties": {
@@ -3199,6 +3111,22 @@
},
"type": "object"
},
"SubscriptionCancelSurveyResult": {
"description": "Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey).",
"id": "SubscriptionCancelSurveyResult",
"properties": {
"cancelSurveyReason": {
"description": "The cancellation reason the user chose in the survey. Possible values are: \n- Other \n- I don't use this service enough \n- Technical issues \n- Cost-related reasons \n- I found a better app",
"format": "int32",
"type": "integer"
},
"userInputCancelReason": {
"description": "The customized input cancel reason from the user. Only present when cancelReason is 0.",
"type": "string"
}
},
"type": "object"
},
"SubscriptionDeferralInfo": {
"description": "A SubscriptionDeferralInfo contains the data needed to defer a subscription purchase to a future expiry time.",
"id": "SubscriptionDeferralInfo",
@@ -3229,6 +3157,10 @@
"format": "int32",
"type": "integer"
},
"cancelSurveyResult": {
"$ref": "SubscriptionCancelSurveyResult",
"description": "Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey)."
},
"countryCode": {
"description": "ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.",
"type": "string"
@@ -3237,11 +3169,23 @@
"description": "A developer-specified string that contains supplemental information about an order.",
"type": "string"
},
"emailAddress": {
"description": "The email address of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.",
"type": "string"
},
"expiryTimeMillis": {
"description": "Time at which the subscription will expire, in milliseconds since the Epoch.",
"format": "int64",
"type": "string"
},
"familyName": {
"description": "The family name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.",
"type": "string"
},
"givenName": {
"description": "The given name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.",
"type": "string"
},
"kind": {
"default": "androidpublisher#subscriptionPurchase",
"description": "This kind represents a subscriptionPurchase object in the androidpublisher service.",
@@ -3269,6 +3213,14 @@
"description": "ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is \"GBP\".",
"type": "string"
},
"profileId": {
"description": "The profile id of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.",
"type": "string"
},
"profileName": {
"description": "The profile name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.",
"type": "string"
},
"purchaseType": {
"description": "The type of purchase of the subscription. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: \n- Test (i.e. purchased from a license testing account)",
"format": "int32",
@@ -3356,7 +3308,7 @@
"id": "Track",
"properties": {
"track": {
"description": "Identifier for this track. One of \"alpha\", \"beta\", \"production\" or \"rollout\".",
"description": "Identifier for this track. One of \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
"type": "string"
},
"userFraction": {
+81 -281
View File
@@ -57,7 +57,6 @@ func New(client *http.Client) (*Service, error) {
}
s := &Service{client: client, BasePath: basePath}
s.Edits = NewEditsService(s)
s.Entitlements = NewEntitlementsService(s)
s.Inappproducts = NewInappproductsService(s)
s.Purchases = NewPurchasesService(s)
s.Reviews = NewReviewsService(s)
@@ -71,8 +70,6 @@ type Service struct {
Edits *EditsService
Entitlements *EntitlementsService
Inappproducts *InappproductsService
Purchases *PurchasesService
@@ -204,15 +201,6 @@ type EditsTracksService struct {
s *Service
}
func NewEntitlementsService(s *Service) *EntitlementsService {
rs := &EntitlementsService{s: s}
return rs
}
type EntitlementsService struct {
s *Service
}
func NewInappproductsService(s *Service) *InappproductsService {
rs := &InappproductsService{s: s}
return rs
@@ -766,82 +754,6 @@ func (s *DeviceMetadata) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Entitlement: An Entitlement resource indicates a user's current
// entitlement to an inapp item or subscription.
type Entitlement struct {
// Kind: This kind represents an entitlement object in the
// androidpublisher service.
Kind string `json:"kind,omitempty"`
// ProductId: The SKU of the product.
ProductId string `json:"productId,omitempty"`
// ProductType: The type of the inapp product. Possible values are:
// - In-app item: "inapp"
// - Subscription: "subs"
ProductType string `json:"productType,omitempty"`
// Token: The token which can be verified using the subscriptions or
// products API.
Token string `json:"token,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *Entitlement) MarshalJSON() ([]byte, error) {
type NoMethod Entitlement
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type EntitlementsListResponse struct {
PageInfo *PageInfo `json:"pageInfo,omitempty"`
Resources []*Entitlement `json:"resources,omitempty"`
TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "PageInfo") 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. "PageInfo") 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 *EntitlementsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod EntitlementsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type ExpansionFile struct {
// FileSize: If set this field indicates that this APK has an Expansion
// File uploaded to it: this APK does not reference another APK's
@@ -1752,6 +1664,47 @@ func (s *Season) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SubscriptionCancelSurveyResult: Information provided by the user when
// they complete the subscription cancellation flow (cancellation reason
// survey).
type SubscriptionCancelSurveyResult struct {
// CancelSurveyReason: The cancellation reason the user chose in the
// survey. Possible values are:
// - Other
// - I don't use this service enough
// - Technical issues
// - Cost-related reasons
// - I found a better app
CancelSurveyReason int64 `json:"cancelSurveyReason,omitempty"`
// UserInputCancelReason: The customized input cancel reason from the
// user. Only present when cancelReason is 0.
UserInputCancelReason string `json:"userInputCancelReason,omitempty"`
// ForceSendFields is a list of field names (e.g. "CancelSurveyReason")
// 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. "CancelSurveyReason") 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 *SubscriptionCancelSurveyResult) MarshalJSON() ([]byte, error) {
type NoMethod SubscriptionCancelSurveyResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SubscriptionDeferralInfo: A SubscriptionDeferralInfo contains the
// data needed to defer a subscription purchase to a future expiry time.
type SubscriptionDeferralInfo struct {
@@ -1807,6 +1760,11 @@ type SubscriptionPurchase struct {
// - Subscription was canceled by the developer
CancelReason *int64 `json:"cancelReason,omitempty"`
// CancelSurveyResult: Information provided by the user when they
// complete the subscription cancellation flow (cancellation reason
// survey).
CancelSurveyResult *SubscriptionCancelSurveyResult `json:"cancelSurveyResult,omitempty"`
// CountryCode: ISO 3166-1 alpha-2 billing country/region code of the
// user at the time the subscription was granted.
CountryCode string `json:"countryCode,omitempty"`
@@ -1815,10 +1773,25 @@ type SubscriptionPurchase struct {
// supplemental information about an order.
DeveloperPayload string `json:"developerPayload,omitempty"`
// EmailAddress: The email address of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
EmailAddress string `json:"emailAddress,omitempty"`
// ExpiryTimeMillis: Time at which the subscription will expire, in
// milliseconds since the Epoch.
ExpiryTimeMillis int64 `json:"expiryTimeMillis,omitempty,string"`
// FamilyName: The family name of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
FamilyName string `json:"familyName,omitempty"`
// GivenName: The given name of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
GivenName string `json:"givenName,omitempty"`
// Kind: This kind represents a subscriptionPurchase object in the
// androidpublisher service.
Kind string `json:"kind,omitempty"`
@@ -1859,6 +1832,16 @@ type SubscriptionPurchase struct {
// price_currency_code is "GBP".
PriceCurrencyCode string `json:"priceCurrencyCode,omitempty"`
// ProfileId: The profile id of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
ProfileId string `json:"profileId,omitempty"`
// ProfileName: The profile name of the user when the subscription was
// purchased. Only present for purchases made with 'Subscribe with
// Google'.
ProfileName string `json:"profileName,omitempty"`
// PurchaseType: The type of purchase of the subscription. This field is
// only set if this purchase was not made using the standard in-app
// billing flow. Possible values are:
@@ -2052,7 +2035,7 @@ func (s *TokenPagination) MarshalJSON() ([]byte, error) {
type Track struct {
// Track: Identifier for this track. One of "alpha", "beta",
// "production" or "rollout".
// "production", "rollout" or "internal".
Track string `json:"track,omitempty"`
UserFraction float64 `json:"userFraction,omitempty"`
@@ -7556,9 +7539,9 @@ func (c *EditsTestersGetCall) Do(opts ...googleapi.CallOption) (*Testers, error)
// "type": "string"
// },
// "track": {
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
// "location": "path",
// "pattern": "(alpha|beta|production|rollout)",
// "pattern": "(alpha|beta|production|rollout|internal)",
// "required": true,
// "type": "string"
// }
@@ -7706,9 +7689,9 @@ func (c *EditsTestersPatchCall) Do(opts ...googleapi.CallOption) (*Testers, erro
// "type": "string"
// },
// "track": {
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
// "location": "path",
// "pattern": "(alpha|beta|production|rollout)",
// "pattern": "(alpha|beta|production|rollout|internal)",
// "required": true,
// "type": "string"
// }
@@ -7859,9 +7842,9 @@ func (c *EditsTestersUpdateCall) Do(opts ...googleapi.CallOption) (*Testers, err
// "type": "string"
// },
// "track": {
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\", \"rollout\" or \"internal\".",
// "location": "path",
// "pattern": "(alpha|beta|production|rollout)",
// "pattern": "(alpha|beta|production|rollout|internal)",
// "required": true,
// "type": "string"
// }
@@ -8021,9 +8004,8 @@ func (c *EditsTracksGetCall) Do(opts ...googleapi.CallOption) (*Track, error) {
// "type": "string"
// },
// "track": {
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
// "description": "The track to read or modify.",
// "location": "path",
// "pattern": "(alpha|beta|production|rollout)",
// "required": true,
// "type": "string"
// }
@@ -8322,9 +8304,8 @@ func (c *EditsTracksPatchCall) Do(opts ...googleapi.CallOption) (*Track, error)
// "type": "string"
// },
// "track": {
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
// "description": "The track to read or modify.",
// "location": "path",
// "pattern": "(alpha|beta|production|rollout)",
// "required": true,
// "type": "string"
// }
@@ -8478,9 +8459,8 @@ func (c *EditsTracksUpdateCall) Do(opts ...googleapi.CallOption) (*Track, error)
// "type": "string"
// },
// "track": {
// "description": "The track to read or modify. Acceptable values are: \"alpha\", \"beta\", \"production\" or \"rollout\".",
// "description": "The track to read or modify.",
// "location": "path",
// "pattern": "(alpha|beta|production|rollout)",
// "required": true,
// "type": "string"
// }
@@ -8499,186 +8479,6 @@ func (c *EditsTracksUpdateCall) Do(opts ...googleapi.CallOption) (*Track, error)
}
// method id "androidpublisher.entitlements.list":
type EntitlementsListCall struct {
s *Service
packageName string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Lists the user's current inapp item or subscription
// entitlements
func (r *EntitlementsService) List(packageName string) *EntitlementsListCall {
c := &EntitlementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.packageName = packageName
return c
}
// MaxResults sets the optional parameter "maxResults":
func (c *EntitlementsListCall) MaxResults(maxResults int64) *EntitlementsListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
// ProductId sets the optional parameter "productId": The product id of
// the inapp product (for example, 'sku1'). This can be used to restrict
// the result set.
func (c *EntitlementsListCall) ProductId(productId string) *EntitlementsListCall {
c.urlParams_.Set("productId", productId)
return c
}
// StartIndex sets the optional parameter "startIndex":
func (c *EntitlementsListCall) StartIndex(startIndex int64) *EntitlementsListCall {
c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
return c
}
// Token sets the optional parameter "token":
func (c *EntitlementsListCall) Token(token string) *EntitlementsListCall {
c.urlParams_.Set("token", token)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *EntitlementsListCall) Fields(s ...googleapi.Field) *EntitlementsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *EntitlementsListCall) IfNoneMatch(entityTag string) *EntitlementsListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *EntitlementsListCall) Context(ctx context.Context) *EntitlementsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *EntitlementsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *EntitlementsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{packageName}/entitlements")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"packageName": c.packageName,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "androidpublisher.entitlements.list" call.
// Exactly one of *EntitlementsListResponse or error will be non-nil.
// Any non-2xx status code is an error. Response headers are in either
// *EntitlementsListResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *EntitlementsListCall) Do(opts ...googleapi.CallOption) (*EntitlementsListResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &EntitlementsListResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Lists the user's current inapp item or subscription entitlements",
// "httpMethod": "GET",
// "id": "androidpublisher.entitlements.list",
// "parameterOrder": [
// "packageName"
// ],
// "parameters": {
// "maxResults": {
// "format": "uint32",
// "location": "query",
// "type": "integer"
// },
// "packageName": {
// "description": "The package name of the application the inapp product was sold in (for example, 'com.some.thing').",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "productId": {
// "description": "The product id of the inapp product (for example, 'sku1'). This can be used to restrict the result set.",
// "location": "query",
// "type": "string"
// },
// "startIndex": {
// "format": "uint32",
// "location": "query",
// "type": "integer"
// },
// "token": {
// "location": "query",
// "type": "string"
// }
// },
// "path": "{packageName}/entitlements",
// "response": {
// "$ref": "EntitlementsListResponse"
// }
// }
}
// method id "androidpublisher.inappproducts.delete":
type InappproductsDeleteCall struct {