techbookfest

package
v0.0.0-...-1ff25e7 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewTechBookFest

func NewTechBookFest(ctx context.Context) (*Client, error)

func (*Client) GetMarketDashboard

func (c *Client) GetMarketDashboard(ctx context.Context, first int) (*MarketDashboard, error)

func (*Client) GetProductInfo

func (c *Client) GetProductInfo(ctx context.Context, productID string) (*ProductInfo, error)

type MarketDashboard

type MarketDashboard struct {
	Data struct {
		AllProductVariants struct {
			PageInfo struct {
				HasNextPage bool   `json:"hasNextPage"`
				EndCursor   string `json:"endCursor"`
			} `json:"pageInfo"`
			Nodes []struct {
				Products struct {
					Nodes []struct {
						ID string `json:"id"`
					} `json:"nodes"`
				} `json:"products"`
			} `json:"nodes"`
		} `json:"allProductVariants"`
	} `json:"data"`
}

type ProductInfo

type ProductInfo struct {
	Data struct {
		Product struct {
			DatabaseID               string `json:"databaseID"`
			Name                     string `json:"name"`
			Description              string `json:"description"`
			Page                     int    `json:"page"`
			FirstAppearanceEventName string `json:"firstAppearanceEventName"`
			Organization             struct {
				Name string `json:"name"`
			} `json:"organization"`
			ProductVariants struct {
				Nodes []struct {
					Name                   string `json:"name"`
					Price                  int    `json:"price"`
					MarketShippingRequired bool   `json:"marketShippingRequired"`
				} `json:"nodes"`
			} `json:"productVariants"`
		} `json:"product"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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