C# Class Senparc.Weixin.QY.CommonAPIs.JsApiTicketContainer

通用接口JsApiTicket容器,用于自动管理JsApiTicket,如果过期会重新获取
Datei anzeigen Open project: Chinaccn/surfboard

Public Methods

Method Description
CheckRegistered ( string appId ) : bool

检查是否已经注册

GetTicket ( string appId, bool getNewTicket = false ) : string

获取可用Ticket

GetTicketResult ( string appId, bool getNewTicket = false ) : JsApiTicketResult

获取可用Ticket

Register ( string appId, string appSecret ) : void

注册应用凭证信息,此操作只是注册,不会马上获取Ticket,并将清空之前的Ticket,

TryGetTicket ( string appId, string appSecret, bool getNewTicket = false ) : string

使用完整的应用凭证获取Ticket,如果不存在将自动注册

Method Details

CheckRegistered() public static method

检查是否已经注册
public static CheckRegistered ( string appId ) : bool
appId string
return bool

GetTicket() public static method

获取可用Ticket
public static GetTicket ( string appId, bool getNewTicket = false ) : string
appId string
getNewTicket bool 是否强制重新获取新的Ticket
return string

GetTicketResult() public static method

获取可用Ticket
public static GetTicketResult ( string appId, bool getNewTicket = false ) : JsApiTicketResult
appId string
getNewTicket bool 是否强制重新获取新的Ticket
return Senparc.Weixin.QY.Entities.JsApiTicketResult

Register() public static method

注册应用凭证信息,此操作只是注册,不会马上获取Ticket,并将清空之前的Ticket,
public static Register ( string appId, string appSecret ) : void
appId string
appSecret string
return void

TryGetTicket() public static method

使用完整的应用凭证获取Ticket,如果不存在将自动注册
public static TryGetTicket ( string appId, string appSecret, bool getNewTicket = false ) : string
appId string
appSecret string
getNewTicket bool
return string