Package com.foxinmy.weixin4j.qy.api
Class SuiteApi
- java.lang.Object
-
- com.foxinmy.weixin4j.api.BaseApi
-
- com.foxinmy.weixin4j.qy.api.QyApi
-
- com.foxinmy.weixin4j.qy.api.SuiteApi
-
-
Field Summary
-
Fields inherited from class com.foxinmy.weixin4j.api.BaseApi
weixinExecutor
-
-
Constructor Summary
Constructors Constructor Description SuiteApi(TicketManager ticketManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OUserInfo
exchangeAuthInfo(String authCode)
临时授权码换取授权方的永久授权码,并换取授权信息、企业access_tokenAgentInfo
getAgent(String authCorpId, int agentid)
获取企业号应用OUserInfo
getAuthInfo(String authCorpId)
获取企业号的授权信息PerTicketManager
getPerTicketManager(String authCorpId)
应用套件永久授权码:企业号的永久授权码TokenManager
getPerTokenManager(String authCorpId)
获取企业号access_token(永久授权码)TokenManager
getPreCodeManager()
应用套件预授权码TicketManager
getTicketManager()
应用套件ticketTokenManager
getTokenManager()
应用套件tokenApiResult
setAgent(String authCorpId, AgentSetter agentSet)
设置企业应用的选项设置信息,如:地理位置上报等ApiResult
setSuiteSession(int... appids)
设置套件授权配置:如果需要对某次授权进行配置,则调用本接口,目前仅可以设置哪些应用可以授权,不调用则默认允许所有应用进行授权。-
Methods inherited from class com.foxinmy.weixin4j.qy.api.QyApi
weixinBundle
-
Methods inherited from class com.foxinmy.weixin4j.api.BaseApi
getRequestUri
-
-
-
-
Constructor Detail
-
SuiteApi
public SuiteApi(TicketManager ticketManager)
- Parameters:
ticketManager
- 套件ticket存取
-
-
Method Detail
-
getTokenManager
public TokenManager getTokenManager()
应用套件token- Returns:
- 应用套件的token管理
-
getTicketManager
public TicketManager getTicketManager()
应用套件ticket- Returns:
- 应用套件的ticket管理
-
getPreCodeManager
public TokenManager getPreCodeManager()
应用套件预授权码- Returns:
- 应用套件的precode管理
-
getPerTicketManager
public PerTicketManager getPerTicketManager(String authCorpId)
应用套件永久授权码:企业号的永久授权码- Parameters:
authCorpid
- 授权方corpid- Returns:
- 应用套件的preticket管理
-
getPerTokenManager
public TokenManager getPerTokenManager(String authCorpId)
获取企业号access_token(永久授权码)- Parameters:
authCorpid
- 授权方corpid- Returns:
- 企业号token
-
setSuiteSession
public ApiResult setSuiteSession(int... appids) throws WeixinException
设置套件授权配置:如果需要对某次授权进行配置,则调用本接口,目前仅可以设置哪些应用可以授权,不调用则默认允许所有应用进行授权。- Parameters:
appids
- 允许进行授权的应用id,如1、2、3- Returns:
- 处理结果
- Throws:
WeixinException
- See Also:
- 设置套件授权配置
-
exchangeAuthInfo
public OUserInfo exchangeAuthInfo(String authCode) throws WeixinException
临时授权码换取授权方的永久授权码,并换取授权信息、企业access_token- Parameters:
authCode
- 临时授权码会在授权成功时附加在redirect_uri中跳转回应用提供商网站。- Returns:
- 授权得到的信息
- Throws:
WeixinException
- See Also:
OUserInfo
, 获取企业号的永久授权码
-
getAuthInfo
public OUserInfo getAuthInfo(String authCorpId) throws WeixinException
获取企业号的授权信息- Parameters:
authCorpId
- 授权方corpid- Returns:
- 授权方信息
- Throws:
WeixinException
- See Also:
OUserInfo
, 获取企业号的授权信息
-
getAgent
public AgentInfo getAgent(String authCorpId, int agentid) throws WeixinException
获取企业号应用- Parameters:
authCorpId
- 授权方corpidagentid
- 授权方应用id- Returns:
- 应用信息
- Throws:
WeixinException
- See Also:
AgentInfo
, 获取企业号应用
-
setAgent
public ApiResult setAgent(String authCorpId, AgentSetter agentSet) throws WeixinException
设置企业应用的选项设置信息,如:地理位置上报等- Parameters:
authCorpId
- 授权方corpidagentSet
- 设置信息- Returns:
- 处理结果
- Throws:
WeixinException
- See Also:
AgentSetter
, 设置企业号信息
-
-