Documentation ¶
Index ¶
- type DefaultMeituanClient
- func (client *DefaultMeituanClient) GetToken(businessId int, code string) ([]byte, error)
- func (client *DefaultMeituanClient) InvokeApi(apiPath string, businessId int, appAuthToken string, data interface{}) ([]byte, error)
- func (client *DefaultMeituanClient) RefreshToken(businessId int, refreshToken string) ([]byte, error)
- type HttpClient
- type MeituanClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultMeituanClient ¶
func (*DefaultMeituanClient) GetToken ¶
func (client *DefaultMeituanClient) GetToken(businessId int, code string) ([]byte, error)
func (*DefaultMeituanClient) InvokeApi ¶
func (client *DefaultMeituanClient) InvokeApi(apiPath string, businessId int, appAuthToken string, data interface{}) ([]byte, error)
InvokeApi 方法用于自定义路径和参数调用美团api, apiPath用于指定API的路径(不包含域名),例如/waimai/order/queryById data字段用于指定业务参数,可使用map[string]string,也可使用包含业务字段的结构体
func (*DefaultMeituanClient) RefreshToken ¶
func (client *DefaultMeituanClient) RefreshToken(businessId int, refreshToken string) ([]byte, error)
type HttpClient ¶
type MeituanClient ¶
type MeituanClient interface { InvokeApi(apiPath string, businessId int, appAuthToken string, data interface{}) ([]byte, error) GetToken(businessId int, code string) ([]byte, error) RefreshToken(businessId int, refreshToken string) ([]byte, error) }
func NewDefaultClient ¶
func NewDefaultClient(developerId int64, signKey string) MeituanClient
func NewDefaultClientWithTimeout ¶
func NewDefaultClientWithTimeout(developerId int64, signKey string, timeoutSec int64) MeituanClient
Click to show internal directories.
Click to hide internal directories.