aa
This commit is contained in:
@@ -218,6 +218,8 @@ func (a *API) AccessAPI(cmd string, isGet bool, bizParams map[string]interface{}
|
||||
return a.AccessAPI2(cmd, isGet, bizParams, resultKeyData, "")
|
||||
}
|
||||
|
||||
//美团认证
|
||||
//https://open-shangou.meituan.com/home/guide/38
|
||||
func (a *API) GetOAuthCode(appPoiCode string) (retVal interface{}, err error) {
|
||||
retVal, err = a.AccessAPI2("oauth/authorize", true, map[string]interface{}{
|
||||
"app_poi_code": appPoiCode,
|
||||
@@ -233,3 +235,19 @@ func (a *API) GetAccessToken(code string) (retVal interface{}, err error) {
|
||||
}, "access_token", "")
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
func (a *API) GetAccessToken2(appPoiCode string) (retVal interface{}, err error) {
|
||||
retVal, err = a.AccessAPI2("oauth/authorize", true, map[string]interface{}{
|
||||
"response_type": "token",
|
||||
"app_poi_code": appPoiCode,
|
||||
}, "access_token", "")
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
func (a *API) RefreshAccessToken(token string) (retVal interface{}, err error) {
|
||||
retVal, err = a.AccessAPI2("oauth/token", false, map[string]interface{}{
|
||||
"grant_type": "refresh_token",
|
||||
"refresh_token": token,
|
||||
}, "access_token", "")
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user