openapi-sdk-go

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

openapi-sdk-go

介绍

dataoke openapi sdk for go

安装教程

go get -u gitee.com/dtk-developer/openapi-sdk-go/sdk

使用说明
package main

import (
	"fmt"
	"gitee.com/dtk-developer/openapi-sdk-go/sdk"
)

func main() {
	var (
		apiUrl = "https://openapi.dataoke.com/api/goods/get-goods-list"
		appKey = "xxxxxx"
		appSecret = "xxxxxxxxxx"
		version	 = "v1.2.4"
		params = make(map[string]string)
	)

	client, err := sdk.NewClientWithAccessKey(appKey, appSecret, version)
	if err != nil {
		panic(err)
	}

	params["pageId"] = "1"
	params["pageSize"] = "10"
	rsp, err := client.Request(apiUrl, params, sdk.GET)
	if err != nil {
		panic(err)
	}
	fmt.Println(rsp)
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL