shopify

package
v0.0.0-...-3a0a0a1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ShopifyAPI    string
	ShopifyJSKey  string
	ShopifyDomain string
)

Functions

func AddImage

func AddImage(id string, img []byte) error

func Create

func Create(title, category, price string) (string, error)

func Delete

func Delete(id string) error

func Init

func Init(c config.Config)

func NewDiscountCode

func NewDiscountCode(storeName string) (int, string, error)

Types

type DiscountCode

type DiscountCode struct {
	ID           int    `json:"id"`
	DiscountType string `json:"discount_type"`
	Value        string `json:"value"`
	Code         string `json:"code"`
	Min          string `json:"minimum_order_amount"`
}

type Img

type Img struct {
	Src string `json:"src,omitempty"`
}

type Product

type Product struct {
	ID             int       `json:"id,omitempty"`
	Title          string    `json:"title"`
	ProductType    string    `json:"product_type"`
	PublishedAt    string    `json:"published_at"`
	PublishedScope string    `json:"published_scope"`
	Images         []Img     `json:"images"`
	Variants       []Variant `json:"variants"`
}

type Variant

type Variant struct {
	ID    int    `json:"id"`
	Price string `json:"price"`
}

Jump to

Keyboard shortcuts

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