File tree Expand file tree Collapse file tree 5 files changed +53
-41
lines changed Expand file tree Collapse file tree 5 files changed +53
-41
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,3 +2,32 @@ go-shopify
22==========
33
44Golang tool for connecting to Shopify's API
5+
6+ ## Installation
7+
8+ You need to have Git and Go already installed.
9+ Run this in your terminal
10+
11+ ``` sh
12+ go get github.com/arduino/go-shopify
13+ ```
14+
15+ ## Usage
16+
17+ Import it in your Go code:
18+
19+ ``` go
20+ import (
21+ " github.com/arduino/go-shopify/shopify"
22+ )
23+ ```
24+
25+ ## Client Creation
26+
27+ To initialize a client you need the shopify private app password
28+
29+ ``` go
30+ shop := shopify.NewClient (" your-shop-domain" , " app-password" )
31+ ```
32+
33+ See functions used in example/example.go
Original file line number Diff line number Diff line change 1- package main
2-
3- import (
4- "fmt"
5- "github.com/hammond-bones/go-shopify/shopify"
6- "strconv"
7- )
8-
9- func main () {
10- fmt .Printf ("Hello!\n " )
11- shop := shopify .NewClient ("mcglynn-quitzon-and-windler8990" , "98bfc43d6aa771567326d76e6395173d" )
12-
13- shop .LoadProducts ()
14-
15- fmt .Printf ("%v\n " , shop .Products [0 ].Id )
16-
17- prod := shop .GetLiveProduct (strconv .Itoa (shop .Products [0 ].Id ))
18-
19- fmt .Printf ("%v\n " , prod .Handle )
20- }
1+ package main
2+
3+ import (
4+ "fmt"
5+ "strconv"
6+
7+ "github.com/arduino/go-shopify/shopify"
8+ )
9+
10+ func main () {
11+ fmt .Printf ("Hello!\n " )
12+ shop := shopify .NewClient ("mcglynn-quitzon-and-windler8990" , "98bfc43d6aa771567326d76e6395173d" )
13+
14+ shop .LoadProducts ()
15+
16+ fmt .Printf ("%v\n " , shop .Products [0 ].ID )
17+
18+ prod := shop .GetLiveProduct (strconv .Itoa (shop .Products [0 ].ID ))
19+
20+ order := shop .GetOrder ("123456" )
21+
22+ fmt .Printf ("%v\n " , prod .Handle )
23+ fmt .Printf ("%v\n " , order )
24+ }
You can’t perform that action at this time.
0 commit comments