Documentation
¶
Index ¶
- Constants
- type Base
- func (b *Base) AccessTokenSign() string
- func (b *Base) GetAccessToken() (string, int64, error)
- func (b *Base) Result() (string, error)
- func (b *Base) SetAccessTokenUrl(_url string)
- func (b *Base) Sign(data map[string]interface{}, accessToken string) string
- func (b *Base) WithRequestParams(_url string, data map[string]interface{}, accessToken string) *Base
Constants ¶
View Source
const ( OnlineUrl = "https://open-anubis.ele.me/anubis-webapi" NoOnlineUrl = "https://exam-anubis.ele.me/anubis-webapi" Timeout = 5000 // 超时时间 5000ms )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
Client *http.Client // Change this to your actual client type
AppID string
AppSecret string
Salt int
Host string
URL string
AccessTokenURL string
RequestData string // 请求参数map
}
func (*Base) AccessTokenSign ¶
AccessTokenSign generates a signature for the access token
func (*Base) GetAccessToken ¶
GetAccessToken returns the access token visit: https://open.ele.me/documents/ka/1371
func (*Base) SetAccessTokenUrl ¶
Click to show internal directories.
Click to hide internal directories.