wool_sdk

package
v0.0.0-...-72547fc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToUrlencoded

func MapToUrlencoded(m map[string]string, secretKey string) string

Types

type ApiResult

type ApiResult struct {
	Error        int         `json:"error"`
	ErrorMessage string      `json:"error_msg"`
	Data         interface{} `json:"data,omitempty"`
}

type WoolSDK

type WoolSDK struct {
	ApiGateway string
	AppKey     string
	AppSecret  string
}

func (*WoolSDK) ApiRequest

func (client *WoolSDK) ApiRequest(method string, jsonObject map[string]string) (ApiResult, error)

API封装请求

func (*WoolSDK) GetIMToken

func (client *WoolSDK) GetIMToken(userID string) (ApiResult, error)

获取用户IMtoken

func (*WoolSDK) GetNonce

func (client *WoolSDK) GetNonce() string

API参数签名

func (*WoolSDK) GetSign

func (client *WoolSDK) GetSign(jsonObject map[string]string) string

API参数签名

func (*WoolSDK) Request

func (client *WoolSDK) Request(apiUrl string, jsonObject map[string]string) (string, error)

基础请求接口

Jump to

Keyboard shortcuts

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