Version: v0.0.3 Latest Latest

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

Go to latest
Published: Apr 2, 2020 License: BSD-2-Clause Imports: 3 Imported by: 0



Package product provides APIs related to products.



This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {

Client performs API operations.

func (Client) List

func (c Client) List() (Iter, error)

List requests a list of proucts available on your account and returns an iterator that decodes them from the response body. If an error is returned, it is decoded and returned immediately.

type Iter

type Iter struct {
	Total int
	Count int
	// contains filtered or unexported fields

Iter provides a mechanism for lazily decoding and iterating over a list of products.

func (Iter) Decode

func (p Iter) Decode() (*Product, error)

Decode returns the next product.

func (Iter) Next

func (p Iter) Next() bool

Next returns true if there are more products to decode.

type Product

type Product struct {
	ID          uint64   `json:"id"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	BasePrice   float64  `json:"base_price"`
	SalePrice   *int     `json:"sale_price"`
	Screenshots []string `json:"screenshots"`
	Icon        string   `json:"icon"`

Product contains data from a single product.

Source Files

Jump to

Keyboard shortcuts

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