fix: remove persist-credentials to allow semantic-release push
All checks were successful
Release / release (push) Successful in 23s
All checks were successful
Release / release (push) Successful in 23s
This commit is contained in:
31
example_get_orders_by.go
Normal file
31
example_get_orders_by.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
|
||||
"github.com/debyltech/go-snipcart/snipcart"
|
||||
)
|
||||
|
||||
func main() {
|
||||
snipcartApiKey := flag.String("key", "", "Snipcart API Key")
|
||||
flag.Parse()
|
||||
|
||||
if *snipcartApiKey == "" {
|
||||
log.Fatal("missing -key flag")
|
||||
}
|
||||
|
||||
Client := snipcart.NewClient(*snipcartApiKey)
|
||||
|
||||
response, err := Client.GetOrders(map[string]string{
|
||||
"placedBy": "bastian@bdebyl.net",
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Println("no errors continuing")
|
||||
|
||||
for k, v := range response.Items {
|
||||
log.Printf("%v: %v\n", k, v)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user