public class WechatMpClient extends Object implements WechatMpApi
cgi_bin_ticket_getticket, cgibin_add_template, cgibin_send_data, cgibin_set_industry, cgibin_token, oauth2_access_token, oauth2_refresh_token, sns_auth_token, sns_userinfo| 构造器和说明 |
|---|
WechatMpClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
generateWechatUrl(String appId,
String scope,
String callback,
String bizData)
|
static boolean |
isvalidOauthAccessToken(Map<String,Object> mapToken)
|
static TokenResponse |
obtainAccessToken(String appid,
String secret)
|
static JsApiTicketResponse |
obtainJsApiTicket(String token)
|
static JsApiTicketResponse |
obtainJsApiTicket(String appid,
String secret)
|
static OauthTokenResponse |
obtainOauthAccessToken(Map<String,Object> mapToken)
|
static TemplateResponse |
obtainTemplateId(String access_token,
String template_id_short)
|
static UserInfoResponse |
obtainUserInfo(Map<String,Object> userInfoMap)
|
static OauthTokenResponse |
refreshOauthAccessToken(Map<String,Object> mapToken)
|
static SendDataResponse |
sendMsgToUser(String access_token,
String data)
|
static IndustryResponse |
setupIndustry(String access_token,
String industry_id1,
String industry_id2)
|
public static OauthTokenResponse obtainOauthAccessToken(Map<String,Object> mapToken) throws Exception
mapToken - the map tokenException - the exceptionpublic static OauthTokenResponse refreshOauthAccessToken(Map<String,Object> mapToken) throws Exception
mapToken - the map tokenException - the exceptionpublic static String generateWechatUrl(String appId, String scope, String callback, String bizData) throws Exception
appId - the app idscope - the scopecallback - the callbackbizData - the biz dataException - the exceptionpublic static UserInfoResponse obtainUserInfo(Map<String,Object> userInfoMap) throws Exception
userInfoMap - the user info mapException - the exceptionpublic static boolean isvalidOauthAccessToken(Map<String,Object> mapToken) throws Exception
mapToken - the map tokenException - the exceptionpublic static TokenResponse obtainAccessToken(String appid, String secret) throws Exception
appid - the appidsecret - the secretException - the exceptionpublic static JsApiTicketResponse obtainJsApiTicket(String token) throws Exception
token - 普通tokenException - the exceptionpublic static JsApiTicketResponse obtainJsApiTicket(String appid, String secret) throws Exception
appid - the appidsecret - the secretException - the exceptionpublic static TemplateResponse obtainTemplateId(String access_token, String template_id_short) throws Exception
access_token - the access tokentemplate_id_short - the template id shortException - the exceptionpublic static IndustryResponse setupIndustry(String access_token, String industry_id1, String industry_id2) throws Exception
access_token - the access tokenindustry_id1 - the industry id 1industry_id2 - the industry id 2Exception - the exceptionpublic static SendDataResponse sendMsgToUser(String access_token, String data) throws Exception
access_token - the access tokendata - json格式数据Exception - the exceptionCopyright © 2018. All rights reserved.