aiqq

package module
v0.0.0-...-2439577 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GATEWAY = "https://api.ai.qq.com/fcgi-bin"
)

Variables

This section is empty.

Functions

func Md5

func Md5(str string) string

func Nonce

func Nonce() string

func SortParamters

func SortParamters(params url.Values) []string

Types

type Client

type Client struct {
	http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(appId string, appKey string) *Client

func (*Client) Do

func (this *Client) Do(r Request) (json.RawMessage, error)

func (*Client) RequestValues

func (this *Client) RequestValues(r Request) url.Values

func (*Client) Sign

func (this *Client) Sign(values url.Values) string

type Request

type Request interface {
	Path() string
	Method() string
	Values() url.Values
}

type Response

type Response struct {
	Ret  int             `json:"ret,omitempty"`
	Msg  string          `json:"msg,omitempty"`
	Data json.RawMessage `json:"data,omitempty"`
}

func (*Response) Error

func (this *Response) Error() string

func (*Response) IsError

func (this *Response) IsError() bool

Directories

Path Synopsis
api
nlp
internal

Jump to

Keyboard shortcuts

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