C# Class Senparc.Weixin.MP.AdvancedAPIs.QrCodeApi

二维码接口
Afficher le fichier Open project: JeffreySu/WeiXinMPSDK

Méthodes publiques

Méthode Description
Create ( string accessTokenOrAppId, int expireSeconds, int sceneId, QrCode_ActionName actionName, string sceneStr = null, int timeOut = Config.TIME_OUT ) : CreateQrCodeResult

创建二维码

CreateAsync ( string accessTokenOrAppId, int expireSeconds, int sceneId, QrCode_ActionName actionName, string sceneStr = null, int timeOut = Config.TIME_OUT ) : Task

创建二维码

GetShowQrCodeUrl ( string ticket ) : string

获取下载二维码的地址

ShowQrCode ( string ticket, Stream stream ) : void

获取二维码(不需要AccessToken) 错误情况下(如ticket非法)返回HTTP错误码404。

ShowQrCodeAsync ( string ticket, Stream stream ) : System.Threading.Tasks.Task

【异步方法】 获取二维码(不需要AccessToken) 错误情况下(如ticket非法)返回HTTP错误码404。

Method Details

Create() public static méthode

创建二维码
public static Create ( string accessTokenOrAppId, int expireSeconds, int sceneId, QrCode_ActionName actionName, string sceneStr = null, int timeOut = Config.TIME_OUT ) : CreateQrCodeResult
accessTokenOrAppId string
expireSeconds int 临时二维码有效时间,以秒为单位。永久二维码将忽略此参数
sceneId int 场景值ID,临时二维码时为32位整型,永久二维码时最大值为1000
actionName QrCode_ActionName 二维码类型,当actionName为QR_LIMIT_STR_SCENE时,sceneId会被忽略
sceneStr string 场景字符串,仅actionName为QR_LIMIT_STR_SCENE时有效
timeOut int 代理请求超时时间(毫秒)
Résultat CreateQrCodeResult

CreateAsync() public static méthode

创建二维码
public static CreateAsync ( string accessTokenOrAppId, int expireSeconds, int sceneId, QrCode_ActionName actionName, string sceneStr = null, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
expireSeconds int 临时二维码有效时间,以秒为单位。永久二维码将忽略此参数
sceneId int 场景值ID,临时二维码时为32位整型,永久二维码时最大值为1000
actionName QrCode_ActionName 二维码类型,当actionName为QR_LIMIT_STR_SCENE时,sceneId会被忽略
sceneStr string 场景字符串,仅actionName为QR_LIMIT_STR_SCENE时有效
timeOut int 代理请求超时时间(毫秒)
Résultat Task

GetShowQrCodeUrl() public static méthode

获取下载二维码的地址
public static GetShowQrCodeUrl ( string ticket ) : string
ticket string
Résultat string

ShowQrCode() public static méthode

获取二维码(不需要AccessToken) 错误情况下(如ticket非法)返回HTTP错误码404。
public static ShowQrCode ( string ticket, Stream stream ) : void
ticket string
stream Stream
Résultat void

ShowQrCodeAsync() public static méthode

【异步方法】 获取二维码(不需要AccessToken) 错误情况下(如ticket非法)返回HTTP错误码404。
public static ShowQrCodeAsync ( string ticket, Stream stream ) : System.Threading.Tasks.Task
ticket string
stream Stream
Résultat System.Threading.Tasks.Task