Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetTokenRequest ¶
type GetTokenRequest struct { BusinessId int //api对应的业务id,请参考API文档的说明赋值 Code string //OAuth授权码,通过授权回调链接从美团获取 }
func NewGetTokenRequest ¶
func NewGetTokenRequest(businessId int, code string) GetTokenRequest
创建一个新的GetTokenRequest
func (GetTokenRequest) GetToken ¶
func (req GetTokenRequest) GetToken(client mtclient.MeituanClient) (*TokenResponse, error)
GetToken 此方法用于通过授权码获取token
type RefreshTokenRequest ¶
type RefreshTokenRequest struct { BusinessId int //api对应的业务id,请参考API文档的说明赋值 RefreshToken string //获取token时同时获得的refreshToken }
func NewRefreshTokenRequest ¶
func NewRefreshTokenRequest(businessId int, refreshToken string) RefreshTokenRequest
创建一个新的RefreshTokenRequest
func (RefreshTokenRequest) TokenRefresh ¶
func (req RefreshTokenRequest) TokenRefresh(client mtclient.MeituanClient) (*TokenResponse, error)
TokenRefresh 此方法用于用于刷新token
type TokenResponse ¶
func (*TokenResponse) IsSuccess ¶
func (response *TokenResponse) IsSuccess() bool
Click to show internal directories.
Click to hide internal directories.