Documentation ¶
Overview ¶
Package shopify: go-shopify provides an easy-to-use API for making CRUD request to shopify.
Index ¶
- type Shopify
- func (shopify *Shopify) Delete(endpoint string) ([]byte, []error)
- func (shopify *Shopify) Get(endpoint string) ([]byte, []error)
- func (shopify *Shopify) Post(endpoint string, data map[string]interface{}) ([]byte, []error)
- func (shopify *Shopify) Put(endpoint string, data map[string]interface{}) ([]byte, []error)
- func (shopify *Shopify) Request(method, endpoint string, data map[string]interface{}) ([]byte, []error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shopify ¶
type Shopify struct {
// contains filtered or unexported fields
}
Shopify store struct which we use to wrap our request operations.
func New ¶
Creates a New Shopify Store API object with the store, apiKey and pass of your store. Usage:
shopify.New("mystore", "XXX","YYY")
func (*Shopify) Delete ¶
Makes a DELETE request to shopify with the given endpoint. Usage: shopify.Delete("products/5.json")
func (*Shopify) Get ¶
Makes a GET request to shopify with the given endpoint. Usage: shopify.Get("products/5.json") shopify.Get("products/5/variants.json")
func (*Shopify) Post ¶
Makes a POST request to shopify with the given endpoint and data. Usage: shopify.Post("products", map[string]interface{} = product data map)
func (*Shopify) Put ¶
Makes a PUT request to shopify with the given endpoint and data. Usage: shopify.Put("products", map[string]interface{} = product data map)
func (*Shopify) Request ¶
func (shopify *Shopify) Request(method, endpoint string, data map[string]interface{}) ([]byte, []error)
Creates a new Request to Shopify and returns the response as a map[string]interface{}. method: GET/POST/PUT - string url: target endpoint like "products" - string data: content to be sent with the request Usage: shopify.request("GET","products",nil)