api

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGet    Method = "GET"
	MethodPost          = "POST"
	MethodPut           = "PUT"
	MethodDelete        = "DELETE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	AccessKey string
	// contains filtered or unexported fields
}

func New

func New(accessKey, secretKey string, baseURL string) *Api

func (*Api) Clone

func (a *Api) Clone() *Api

func (*Api) GetSign

func (a *Api) GetSign(method, uri string, header http.Header) string

func (*Api) Request

func (a *Api) Request(method Method, path string, opts *RequestOptions) *gorequest.SuperAgent

func (*Api) Upload

func (a *Api) Upload(path string, opts *RequestOptions) *gorequest.SuperAgent

func (*Api) Ver2

func (a *Api) Ver2() *Api

type Method

type Method string

type RequestOptions

type RequestOptions struct {
	Params map[string]string
	Body   interface{}
	Files  map[string]string
}

Jump to

Keyboard shortcuts

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