Documentation ¶
Overview ¶
Package androidpublisher provides access to the Google Play Developer API.
See https://developers.google.com/android-publisher
Usage example:
import "github.com/zippoxer/google-api-go-client/androidpublisher/v1.1" ... androidpublisherService, err := androidpublisher.New(oauthHttpClient)
Index ¶
- Constants
- type InappPurchase
- type InapppurchasesGetCall
- func (c *InapppurchasesGetCall) Context(ctx context.Context) *InapppurchasesGetCall
- func (c *InapppurchasesGetCall) Do() (*InappPurchase, error)
- func (c *InapppurchasesGetCall) Fields(s ...googleapi.Field) *InapppurchasesGetCall
- func (c *InapppurchasesGetCall) IfNoneMatch(entityTag string) *InapppurchasesGetCall
- func (c *InapppurchasesGetCall) QuotaUser(quotaUser string) *InapppurchasesGetCall
- func (c *InapppurchasesGetCall) UserIP(userIP string) *InapppurchasesGetCall
- type InapppurchasesService
- type PurchasesCancelCall
- func (c *PurchasesCancelCall) Context(ctx context.Context) *PurchasesCancelCall
- func (c *PurchasesCancelCall) Do() error
- func (c *PurchasesCancelCall) Fields(s ...googleapi.Field) *PurchasesCancelCall
- func (c *PurchasesCancelCall) QuotaUser(quotaUser string) *PurchasesCancelCall
- func (c *PurchasesCancelCall) UserIP(userIP string) *PurchasesCancelCall
- type PurchasesGetCall
- func (c *PurchasesGetCall) Context(ctx context.Context) *PurchasesGetCall
- func (c *PurchasesGetCall) Do() (*SubscriptionPurchase, error)
- func (c *PurchasesGetCall) Fields(s ...googleapi.Field) *PurchasesGetCall
- func (c *PurchasesGetCall) IfNoneMatch(entityTag string) *PurchasesGetCall
- func (c *PurchasesGetCall) QuotaUser(quotaUser string) *PurchasesGetCall
- func (c *PurchasesGetCall) UserIP(userIP string) *PurchasesGetCall
- type PurchasesService
- type Service
- type SubscriptionPurchase
Constants ¶
const (
// View and manage your Google Play Developer account
AndroidpublisherScope = "https://www.googleapis.com/auth/androidpublisher"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InappPurchase ¶
type InappPurchase struct { // ConsumptionState: The consumption state of the inapp product. // Possible values are: // - Yet to be consumed // - Consumed ConsumptionState int64 `json:"consumptionState,omitempty"` // DeveloperPayload: A developer-specified string that contains // supplemental information about an order. DeveloperPayload string `json:"developerPayload,omitempty"` // Kind: This kind represents an inappPurchase object in the // androidpublisher service. Kind string `json:"kind,omitempty"` // PurchaseState: The purchase state of the order. Possible values are: // // - Purchased // - Cancelled PurchaseState int64 `json:"purchaseState,omitempty"` // PurchaseTime: The time the product was purchased, in milliseconds // since the epoch (Jan 1, 1970). PurchaseTime int64 `json:"purchaseTime,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "ConsumptionState") 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:"-"` }
InappPurchase: An InappPurchase resource indicates the status of a user's inapp product purchase.
func (*InappPurchase) MarshalJSON ¶
func (s *InappPurchase) MarshalJSON() ([]byte, error)
type InapppurchasesGetCall ¶
type InapppurchasesGetCall struct {
// contains filtered or unexported fields
}
func (*InapppurchasesGetCall) Context ¶
func (c *InapppurchasesGetCall) Context(ctx context.Context) *InapppurchasesGetCall
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 (*InapppurchasesGetCall) Do ¶
func (c *InapppurchasesGetCall) Do() (*InappPurchase, error)
Do executes the "androidpublisher.inapppurchases.get" call. Exactly one of *InappPurchase or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *InappPurchase.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 (*InapppurchasesGetCall) Fields ¶
func (c *InapppurchasesGetCall) Fields(s ...googleapi.Field) *InapppurchasesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*InapppurchasesGetCall) IfNoneMatch ¶
func (c *InapppurchasesGetCall) IfNoneMatch(entityTag string) *InapppurchasesGetCall
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 (*InapppurchasesGetCall) QuotaUser ¶
func (c *InapppurchasesGetCall) QuotaUser(quotaUser string) *InapppurchasesGetCall
QuotaUser sets the optional parameter "quotaUser": 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.
func (*InapppurchasesGetCall) UserIP ¶
func (c *InapppurchasesGetCall) UserIP(userIP string) *InapppurchasesGetCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type InapppurchasesService ¶
type InapppurchasesService struct {
// contains filtered or unexported fields
}
func NewInapppurchasesService ¶
func NewInapppurchasesService(s *Service) *InapppurchasesService
func (*InapppurchasesService) Get ¶
func (r *InapppurchasesService) Get(packageName string, productId string, token string) *InapppurchasesGetCall
Get: Checks the purchase and consumption status of an inapp item.
type PurchasesCancelCall ¶
type PurchasesCancelCall struct {
// contains filtered or unexported fields
}
func (*PurchasesCancelCall) Context ¶
func (c *PurchasesCancelCall) Context(ctx context.Context) *PurchasesCancelCall
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 (*PurchasesCancelCall) Do ¶
func (c *PurchasesCancelCall) Do() error
Do executes the "androidpublisher.purchases.cancel" call.
func (*PurchasesCancelCall) Fields ¶
func (c *PurchasesCancelCall) Fields(s ...googleapi.Field) *PurchasesCancelCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*PurchasesCancelCall) QuotaUser ¶
func (c *PurchasesCancelCall) QuotaUser(quotaUser string) *PurchasesCancelCall
QuotaUser sets the optional parameter "quotaUser": 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.
func (*PurchasesCancelCall) UserIP ¶
func (c *PurchasesCancelCall) UserIP(userIP string) *PurchasesCancelCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type PurchasesGetCall ¶
type PurchasesGetCall struct {
// contains filtered or unexported fields
}
func (*PurchasesGetCall) Context ¶
func (c *PurchasesGetCall) Context(ctx context.Context) *PurchasesGetCall
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 (*PurchasesGetCall) Do ¶
func (c *PurchasesGetCall) Do() (*SubscriptionPurchase, error)
Do executes the "androidpublisher.purchases.get" call. Exactly one of *SubscriptionPurchase or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SubscriptionPurchase.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 (*PurchasesGetCall) Fields ¶
func (c *PurchasesGetCall) Fields(s ...googleapi.Field) *PurchasesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*PurchasesGetCall) IfNoneMatch ¶
func (c *PurchasesGetCall) IfNoneMatch(entityTag string) *PurchasesGetCall
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 (*PurchasesGetCall) QuotaUser ¶
func (c *PurchasesGetCall) QuotaUser(quotaUser string) *PurchasesGetCall
QuotaUser sets the optional parameter "quotaUser": 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.
func (*PurchasesGetCall) UserIP ¶
func (c *PurchasesGetCall) UserIP(userIP string) *PurchasesGetCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type PurchasesService ¶
type PurchasesService struct {
// contains filtered or unexported fields
}
func NewPurchasesService ¶
func NewPurchasesService(s *Service) *PurchasesService
func (*PurchasesService) Cancel ¶
func (r *PurchasesService) Cancel(packageName string, subscriptionId string, token string) *PurchasesCancelCall
Cancel: Cancels a user's subscription purchase. The subscription remains valid until its expiration time.
func (*PurchasesService) Get ¶
func (r *PurchasesService) Get(packageName string, subscriptionId string, token string) *PurchasesGetCall
Get: Checks whether a user's subscription purchase is valid and returns its expiry time.
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Inapppurchases *InapppurchasesService Purchases *PurchasesService // contains filtered or unexported fields }
type SubscriptionPurchase ¶
type SubscriptionPurchase struct { // AutoRenewing: Whether the subscription will automatically be renewed // when it reaches its current expiry time. AutoRenewing bool `json:"autoRenewing,omitempty"` // InitiationTimestampMsec: Time at which the subscription was granted, // in milliseconds since Epoch. InitiationTimestampMsec int64 `json:"initiationTimestampMsec,omitempty,string"` // Kind: This kind represents a subscriptionPurchase object in the // androidpublisher service. Kind string `json:"kind,omitempty"` // ValidUntilTimestampMsec: Time at which the subscription will expire, // in milliseconds since Epoch. ValidUntilTimestampMsec int64 `json:"validUntilTimestampMsec,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "AutoRenewing") 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:"-"` }
SubscriptionPurchase: A SubscriptionPurchase resource indicates the status of a user's subscription purchase.
func (*SubscriptionPurchase) MarshalJSON ¶
func (s *SubscriptionPurchase) MarshalJSON() ([]byte, error)