https://github.com/bububa/go1688
1688 golang SDK
https://github.com/bububa/go1688
Last synced: about 1 year ago
JSON representation
1688 golang SDK
- Host: GitHub
- URL: https://github.com/bububa/go1688
- Owner: bububa
- License: gpl-3.0
- Created: 2019-12-18T10:01:34.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T09:37:22.000Z (over 3 years ago)
- Last Synced: 2024-06-20T00:41:53.337Z (almost 2 years ago)
- Language: Go
- Homepage: https://open.1688.com/solution/solutionDetail.htm?solutionKey=1559112028404#apiAndMessageList
- Size: 161 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 1688.com电商采购API
详情参见1688电商采购[API文档](https://open.1688.com/solution/solutionDetail.htm?solutionKey=1559112028404#apiAndMessageList)
[](https://pkg.go.dev/github.com/bububa/go1688)
[](https://github.com/bububa/go1688/actions/workflows/go.yml)
[](https://github.com/bububa/go1688/actions/workflows/goreleaser.yml)
[](https://github.com/bububa/go1688)
[](https://goreportcard.com/report/github.com/bububa/go1688)
[](https://github.com/bububa/go1688/blob/master/LICENSE)
[](https://GitHub.com/bububa/go1688/releases/)
## Usage
```
package main
import (
"log"
"github.com/bububa/go1688"
"github.com/bububa/go1688/requests/alibaba/product"
)
const (
AppKey = "xxx"
AppSecret = "xxx"
productId uint64 = 594279676823
)
func main() {
client := go1688.NewClient(AppKey, AppSecret, nil)
getProductInfo(client, productId)
}
func getProductInfo(client *go1688.Client, productId uint64) {
req := &product.CpsMediaProductInfoRequest{
OfferId: productId,
}
info, bizInfos, err := product.CpsMediaProductInfo(client, req, "")
if err != nil {
log.Fatalln(err)
return
}
log.Printf("info: %+v, biz: %+v", info, bizInfos)
}
```