8000 GitHub - localyyz/go-shopify: Go library for accessing the Shopify REST API - (GoDocs coming soon) · GitHub
[go: up one dir, main page]

Skip to content

About

Go library for accessing the Shopify REST API - (GoDocs coming soon)

Topics

Resources

Stars

12 stars

Watchers

3 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-shopify

Go library for accessing the Shopify REST API - (GoDocs coming soon)

go-shopify requires Go version 1.9 or greater.

Usage

import "github.com/localyyz/go-shopify" // v1

Construct a new Shopify client, then use the various services on the client to access different parts of the Shopify API. For example:

client := shopify.NewClient(nil, shopify.ShopURL("https://x.myshopify.com/admin"), shopify.Token("xxx-yyy-zzz"))

// get the store metadata
store, _, err := client.Shop.Get(context.Background())

Some API methods have optional parameters that can be passed. For example:

client := shopify.NewClient(nil, shopify.ShopURL("https://x.myshopify.com/admin"), shopify.Token("xxx-yyy-zzz"))

// create a new checkout
checkout := &shopify.Checkout{Email: "paul@somebuyer.com"}
checkout, _, err := client.Checkout.Create(context.Background(), checkout)

The services of a client divide the API into logical chunks and correspond to the structure of the Shopify API documentation at https://help.shopify.com/en/api/reference.

NOTE: Using the context package, one can easily pass cancelation signals and deadlines to various services of the client for handling a request. In case there is no cont 6700 ext available, then context.Background() can be used as a starting point.

Roadmap

This library is being initially developed for production use at Localyyz, it's now open sourced with the community to as the library have been fairly stable for the past year or so. For future work / improvements:

  • tests coverage
  • example usage
  • documentation and GoDoc generation
  • complete REST api converage

Contributing

Feel free to fork and submit changes upstream. Please follow the pattern established in this package. If you have questions feel free to submit issues, for inspiration and guidelines please refer to the [google/go-github][] library.

License

This library is distributed under the BSD-style license found in the LICENSE file.

About

Go library for accessing the Shopify REST API - (GoDocs coming soon)

Topics

Resources

Stars

12 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0