1
This commit is contained in:
@@ -22,7 +22,7 @@ func init() {
|
||||
}
|
||||
|
||||
func TestCategory(t *testing.T) {
|
||||
accesstoken := `{"access_token":"6c4d71b3-831c-4a96-8d2e-977e37afba5a","expires_in":462248,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"65aae144-4cc0-44d2-89ba-5d3062caca41","authority_id":""}`
|
||||
accesstoken := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652252,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对 接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authorit y_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
data, err := a.GetShopCategory(0)
|
||||
fmt.Println("err=====", err)
|
||||
|
||||
33
platformapi/tiktok_shop/tiktok_api/store_test.go
Normal file
33
platformapi/tiktok_shop/tiktok_api/store_test.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package tiktok_api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCreateStore(t *testing.T) {
|
||||
accesstoken := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652252,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对 接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authorit y_id":""}`
|
||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||
|
||||
param := shop_batchCreateStore_request.StoreListItem{
|
||||
RowId: 1,
|
||||
Name: "京西菜市老怪兽测试门店",
|
||||
StoreCode: "668473",
|
||||
Longitude: "104.052236",
|
||||
Latitude: "30.691359",
|
||||
Province: "四川省",
|
||||
City: "成都市",
|
||||
District: "金牛区",
|
||||
Address: "成都市金牛区市政府旁",
|
||||
Contact: "18981810340",
|
||||
OpenTime: &shop_batchCreateStore_request.OpenTime{DayMap: map[int64]string{
|
||||
1: "07:00-12:00,13:00-18:00",
|
||||
}},
|
||||
}
|
||||
paramList := &shop_batchCreateStore_request.ShopBatchCreateStoreParam{}
|
||||
paramList.StoreList = append(paramList.StoreList, param)
|
||||
data, err := a.BatchCreateStore(paramList)
|
||||
fmt.Println("data==", data)
|
||||
fmt.Println("err==", err)
|
||||
}
|
||||
Reference in New Issue
Block a user