androidpublisher

package
v2.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2015 License: BSD-3-Clause, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package androidpublisher provides access to the Google Play Developer API.

See https://developers.google.com/android-publisher

Usage example:

import "google.golang.org/api/androidpublisher/v1"
...
androidpublisherService, err := androidpublisher.New(oauthHttpClient)

Index

Constants

View Source
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 PurchasesCancelCall

type PurchasesCancelCall struct {
	// contains filtered or unexported fields
}

func (*PurchasesCancelCall) Context

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

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type PurchasesGetCall

type PurchasesGetCall struct {
	// contains filtered or unexported fields
}

func (*PurchasesGetCall) Context

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

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

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.

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

	Purchases *PurchasesService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL