Unofficial Go library for the Lazada Open Platform
go get github.com/Teddy-Schmitz/go-lazada
import "github.com/Teddy-Schmitz/go-lazada/lazada"
Construct a client with a specific region
client := lazada.NewClient("AppKey", "AppSecret", lazada.Singapore)
Call a service
products, err := client.Products.Get(context.Background, &lazada.SearchOptions{Filter: "live", Limit: 100, SKUSellerList: &out})
See the godoc for a list of available services and methods.
Some services require a client token you can add it to a client like this
userClient := client.NewTokenClient("Token")
This returns a new client with the token set. So you can keep the old generic client and use the token client for a specific user.
You can also change the region if necessary.
client.SetRegion(lazada.Malasyia)
- Products
- Auth (System)
Lots of services and methods have not been added as I have only done the ones that I needed. Pull Requests are welcome to add news.
MIT License