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

Show file Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
AddDevice ( string accessTokenOrAppId, long shopId, string ssid, string password, int timeOut = Config.TIME_OUT ) : WxJsonResult

添加设备

AddDeviceAsync ( string accessTokenOrAppId, long shopId, string ssid, string password, int timeOut = Config.TIME_OUT ) : Task

【异步方法】添加设备

DeleteDevice ( string accessTokenOrAppId, string bssid, int timeOut = Config.TIME_OUT ) : WxJsonResult

删除设备

DeleteDeviceAsync ( string accessTokenOrAppId, string bssid, int timeOut = Config.TIME_OUT ) : Task

【异步方法】删除设备

GetConnectUrl ( string accessTokenOrAppId ) : Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiConnectUrlResultJson

获取公众号连网URL

GetConnectUrlAsync ( string accessTokenOrAppId ) : Task

【异步方法】 获取公众号连网URL

GetCouponPut ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : WiFiGetCouponPutJsonResult

查询门店卡券投放信息

GetCouponPutAsync ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】查询门店卡券投放信息

GetDeviceList ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, long shopId = null, int timeOut = Config.TIME_OUT ) : GetDeviceListResult

查询设备

GetDeviceListAsync ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, long shopId = null, int timeOut = Config.TIME_OUT ) : Task

【异步方法】查询设备

GetHomePage ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : GetHomePageResult

查询商家主页

GetHomePageaAsync ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】 查询商家主页

GetQrcode ( string accessTokenOrAppId, long shopId, int imgId, int timeOut = Config.TIME_OUT ) : GetQrcodeResult

获取物料二维码

GetQrcodeAsync ( string accessTokenOrAppId, long shopId, int imgId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取物料二维码

GetStatistics ( string accessTokenOrAppId, string beginDate, string endDate, long shopId = -1, int timeOut = Config.TIME_OUT ) : GetStatisticsResult

数据统计

GetStatisticsAsync ( string accessTokenOrAppId, string beginDate, string endDate, long shopId = -1, int timeOut = Config.TIME_OUT ) : Task

【异步方法】数据统计

OpenPluginToken ( string accessTokenOrAppId, string callBackUrl, int timeOut = Config.TIME_OUT ) : WiFiOpenPluginTokenJsonResult

第三方平台获取开插件wifi_token

OpenPluginTokenAsync ( string accessTokenOrAppId, string callBackUrl, int timeOut = Config.TIME_OUT ) : Task

【异步方法】第三方平台获取开插件wifi_token

SetBar ( string accessTokenOrAppId, long shopId, int barType, int timeOut = Config.TIME_OUT ) : WxJsonResult
SetBarAsync ( string accessTokenOrAppId, long shopId, int barType, int timeOut = Config.TIME_OUT ) : Task
SetCouponPut ( string accessTokenOrAppId, long shopId, string cardId, string cardDescribe, string starTime, string endTime, int cardQuantity, int timeOut = Config.TIME_OUT ) : WxJsonResult
SetCouponPutAsync ( string accessTokenOrAppId, long shopId, string cardId, string cardDescribe, string starTime, string endTime, int cardQuantity, int timeOut = Config.TIME_OUT ) : Task
SetFinishpage ( string accessTokenOrAppId, long shopId, string finishPageUrl, int timeOut = Config.TIME_OUT ) : WxJsonResult
SetFinishpageAsync ( string accessTokenOrAppId, long shopId, string finishPageUrl, int timeOut = Config.TIME_OUT ) : Task
SetHomePage ( string accessTokenOrAppId, long shopId, string url = null, int timeOut = Config.TIME_OUT ) : WxJsonResult

设置商家主页 传入自定义链接则是使用自定义链接,否则使用默认模板

SetHomePageAsync ( string accessTokenOrAppId, long shopId, string url = null, int timeOut = Config.TIME_OUT ) : Task

【异步方法】设置商家主页 传入自定义链接则是使用自定义链接,否则使用默认模板

ShopClean ( string accessTokenOrAppId, long shopId, string ssid, int timeOut = Config.TIME_OUT ) : WxJsonResult

清空门店网络及设备

ShopCleanAsync ( string accessTokenOrAppId, long shopId, string ssid, int timeOut = Config.TIME_OUT ) : Task

【异步方法】清空门店网络及设备

ShopGet ( string accessTokenOrAppId, long shopId, int pageindex = 1, int pagesize = 10, int timeOut = Config.TIME_OUT ) : WiFiShopGetJsonResult

查询门店Wi-Fi信息

ShopGetAsync ( string accessTokenOrAppId, long shopId, int pageindex = 1, int pagesize = 10, int timeOut = Config.TIME_OUT ) : Task

【异步方法】查询门店Wi-Fi信息

ShopList ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, int timeOut = Config.TIME_OUT ) : WiFiShopListJsonResult

获取Wi-Fi门店列表

ShopListAsync ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取Wi-Fi门店列表

ShopUpdate ( string accessTokenOrAppId, long shopId, string oldSsid, string ssid, int timeOut = Config.TIME_OUT ) : WxJsonResult

修改门店网络信息

ShopUpdateAsync ( string accessTokenOrAppId, long shopId, string oldSsid, string ssid, int timeOut = Config.TIME_OUT ) : Task

【异步方法】修改门店网络信息

WifeRegister ( string accessTokenOrAppId, long shopId, string ssid, string reset, int timeOut = Config.TIME_OUT ) : WiFiRegisterJsonResult

添加portal型设备

WifeRegisterAsync ( string accessTokenOrAppId, long shopId, string ssid, string reset, int timeOut = Config.TIME_OUT ) : Task

【异步方法】添加portal型设备

Method Details

AddDevice() public static method

添加设备
public static AddDevice ( string accessTokenOrAppId, long shopId, string ssid, string password, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID
ssid string 无线网络设备的ssid,不能包含中文字符,必需是“WX”开头(“WX”为大写字母)
password string 无线网络设备的密码,大于8个字符,不能包含中文字符
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

AddDeviceAsync() public static method

【异步方法】添加设备
public static AddDeviceAsync ( string accessTokenOrAppId, long shopId, string ssid, string password, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
ssid string 无线网络设备的ssid,不能包含中文字符,必需是“WX”开头(“WX”为大写字母)
password string 无线网络设备的密码,大于8个字符,不能包含中文字符
timeOut int
return Task

DeleteDevice() public static method

删除设备
public static DeleteDevice ( string accessTokenOrAppId, string bssid, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
bssid string 需要删除的无线网络设备无线mac地址,格式冒号分隔,字符长度17个,并且字母小写,例如:00:1f:7a:ad:5c:a8
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

DeleteDeviceAsync() public static method

【异步方法】删除设备
public static DeleteDeviceAsync ( string accessTokenOrAppId, string bssid, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
bssid string 需要删除的无线网络设备无线mac地址,格式冒号分隔,字符长度17个,并且字母小写,例如:00:1f:7a:ad:5c:a8
timeOut int
return Task

GetConnectUrl() public static method

获取公众号连网URL
public static GetConnectUrl ( string accessTokenOrAppId ) : Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiConnectUrlResultJson
accessTokenOrAppId string
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiConnectUrlResultJson

GetConnectUrlAsync() public static method

【异步方法】 获取公众号连网URL
public static GetConnectUrlAsync ( string accessTokenOrAppId ) : Task
accessTokenOrAppId string
return Task

GetCouponPut() public static method

查询门店卡券投放信息
public static GetCouponPut ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : WiFiGetCouponPutJsonResult
accessTokenOrAppId string
shopId long 门店ID,可设置为0,表示所有门店
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiGetCouponPutJsonResult

GetCouponPutAsync() public static method

【异步方法】查询门店卡券投放信息
public static GetCouponPutAsync ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID,可设置为0,表示所有门店
timeOut int
return Task

GetDeviceList() public static method

查询设备
public static GetDeviceList ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, long shopId = null, int timeOut = Config.TIME_OUT ) : GetDeviceListResult
accessTokenOrAppId string
pageIndex int 分页下标,默认从1开始
pageSize int 每页的个数,默认10个,最大20个
shopId long 根据门店id查询
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.GetDeviceListResult

GetDeviceListAsync() public static method

【异步方法】查询设备
public static GetDeviceListAsync ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, long shopId = null, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
pageIndex int 分页下标,默认从1开始
pageSize int 每页的个数,默认10个,最大20个
shopId long 根据门店id查询
timeOut int
return Task

GetHomePage() public static method

查询商家主页
public static GetHomePage ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : GetHomePageResult
accessTokenOrAppId string
shopId long 查询的门店id
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.GetHomePageResult

GetHomePageaAsync() public static method

【异步方法】 查询商家主页
public static GetHomePageaAsync ( string accessTokenOrAppId, long shopId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 查询的门店id
timeOut int
return Task

GetQrcode() public static method

获取物料二维码
public static GetQrcode ( string accessTokenOrAppId, long shopId, int imgId, int timeOut = Config.TIME_OUT ) : GetQrcodeResult
accessTokenOrAppId string
shopId long
imgId int
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.GetQrcodeResult

GetQrcodeAsync() public static method

【异步方法】获取物料二维码
public static GetQrcodeAsync ( string accessTokenOrAppId, long shopId, int imgId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long
imgId int
timeOut int
return Task

GetStatistics() public static method

数据统计
public static GetStatistics ( string accessTokenOrAppId, string beginDate, string endDate, long shopId = -1, int timeOut = Config.TIME_OUT ) : GetStatisticsResult
accessTokenOrAppId string
beginDate string 起始日期时间,格式yyyy-mm-dd,最长时间跨度为30天
endDate string 结束日期时间戳,格式yyyy-mm-dd,最长时间跨度为30天
shopId long 按门店ID搜索,-1为总统计
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.GetStatisticsResult

GetStatisticsAsync() public static method

【异步方法】数据统计
public static GetStatisticsAsync ( string accessTokenOrAppId, string beginDate, string endDate, long shopId = -1, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
beginDate string 起始日期时间,格式yyyy-mm-dd,最长时间跨度为30天
endDate string 结束日期时间戳,格式yyyy-mm-dd,最长时间跨度为30天
shopId long 按门店ID搜索,-1为总统计
timeOut int
return Task

OpenPluginToken() public static method

第三方平台获取开插件wifi_token
public static OpenPluginToken ( string accessTokenOrAppId, string callBackUrl, int timeOut = Config.TIME_OUT ) : WiFiOpenPluginTokenJsonResult
accessTokenOrAppId string
callBackUrl string 回调URL,开通插件成功后的跳转页面。注:该参数域名必须与跳转进开通插件页面的页面域名保持一致,建议均采用第三方平台域名。
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiOpenPluginTokenJsonResult

OpenPluginTokenAsync() public static method

【异步方法】第三方平台获取开插件wifi_token
public static OpenPluginTokenAsync ( string accessTokenOrAppId, string callBackUrl, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
callBackUrl string 回调URL,开通插件成功后的跳转页面。注:该参数域名必须与跳转进开通插件页面的页面域名保持一致,建议均采用第三方平台域名。
timeOut int
return Task

SetBar() public static method

public static SetBar ( string accessTokenOrAppId, long shopId, int barType, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID
barType int 微信首页欢迎语的文本内容:0--欢迎光临+公众号名称;1--欢迎光临+门店名称;2--已连接+公众号名称+WiFi;3--已连接+门店名称+Wi-Fi。
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

SetBarAsync() public static method

public static SetBarAsync ( string accessTokenOrAppId, long shopId, int barType, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
barType int 微信首页欢迎语的文本内容:0--欢迎光临+公众号名称;1--欢迎光临+门店名称;2--已连接+公众号名称+WiFi;3--已连接+门店名称+Wi-Fi。
timeOut int
return Task

SetCouponPut() public static method

public static SetCouponPut ( string accessTokenOrAppId, long shopId, string cardId, string cardDescribe, string starTime, string endTime, int cardQuantity, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID,可设置为0,表示所有门店
cardId string 卡券ID
cardDescribe string 卡券描述,不能超过18个字符
starTime string 卡券投放开始时间(单位是秒)
endTime string 卡券投放结束时间(单位是秒)注:不能超过卡券的有效期时间
cardQuantity int 卡券库存
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

SetCouponPutAsync() public static method

public static SetCouponPutAsync ( string accessTokenOrAppId, long shopId, string cardId, string cardDescribe, string starTime, string endTime, int cardQuantity, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID,可设置为0,表示所有门店
cardId string 卡券ID
cardDescribe string 卡券描述,不能超过18个字符
starTime string 卡券投放开始时间(单位是秒)
endTime string 卡券投放结束时间(单位是秒)注:不能超过卡券的有效期时间
cardQuantity int 卡券库存
timeOut int
return Task

SetFinishpage() public static method

public static SetFinishpage ( string accessTokenOrAppId, long shopId, string finishPageUrl, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID
finishPageUrl string 连网完成页URL。
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

SetFinishpageAsync() public static method

public static SetFinishpageAsync ( string accessTokenOrAppId, long shopId, string finishPageUrl, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
finishPageUrl string 连网完成页URL。
timeOut int
return Task

SetHomePage() public static method

设置商家主页 传入自定义链接则是使用自定义链接,否则使用默认模板
public static SetHomePage ( string accessTokenOrAppId, long shopId, string url = null, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID
url string 自定义链接(选择传入)
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

SetHomePageAsync() public static method

【异步方法】设置商家主页 传入自定义链接则是使用自定义链接,否则使用默认模板
public static SetHomePageAsync ( string accessTokenOrAppId, long shopId, string url = null, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
url string 自定义链接(选择传入)
timeOut int
return Task

ShopClean() public static method

清空门店网络及设备
public static ShopClean ( string accessTokenOrAppId, long shopId, string ssid, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID
ssid string 无线网络设备的ssid。若不填写ssid,默认为清空门店下所有设备;填写ssid则为清空该ssid下的所有设备
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

ShopCleanAsync() public static method

【异步方法】清空门店网络及设备
public static ShopCleanAsync ( string accessTokenOrAppId, long shopId, string ssid, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
ssid string 无线网络设备的ssid。若不填写ssid,默认为清空门店下所有设备;填写ssid则为清空该ssid下的所有设备
timeOut int
return Task

ShopGet() public static method

查询门店Wi-Fi信息
public static ShopGet ( string accessTokenOrAppId, long shopId, int pageindex = 1, int pagesize = 10, int timeOut = Config.TIME_OUT ) : WiFiShopGetJsonResult
accessTokenOrAppId string
shopId long 门店ID
pageindex int 分页下标,默认从1开始
pagesize int 每页的个数,默认10个,最大20个
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiShopGetJsonResult

ShopGetAsync() public static method

【异步方法】查询门店Wi-Fi信息
public static ShopGetAsync ( string accessTokenOrAppId, long shopId, int pageindex = 1, int pagesize = 10, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
pageindex int 分页下标,默认从1开始
pagesize int 每页的个数,默认10个,最大20个
timeOut int
return Task

ShopList() public static method

获取Wi-Fi门店列表
public static ShopList ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, int timeOut = Config.TIME_OUT ) : WiFiShopListJsonResult
accessTokenOrAppId string
pageIndex int 分页下标,默认从1开始
pageSize int 每页的个数,默认10个,最大20个
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiShopListJsonResult

ShopListAsync() public static method

【异步方法】获取Wi-Fi门店列表
public static ShopListAsync ( string accessTokenOrAppId, int pageIndex = 1, int pageSize = 10, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
pageIndex int 分页下标,默认从1开始
pageSize int 每页的个数,默认10个,最大20个
timeOut int
return Task

ShopUpdate() public static method

修改门店网络信息
public static ShopUpdate ( string accessTokenOrAppId, long shopId, string oldSsid, string ssid, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
shopId long 门店ID
oldSsid string 需要修改的ssid,当门店下有多个ssid时,必填
ssid string 无线网络设备的ssid。32个字符以内;ssid支持中文,但可能因设备兼容性问题导致显示乱码,或无法连接等问题,相关风险自行承担!当门店下是portal型设备时,ssid必填;当门店下是密码型设备时,ssid选填,且ssid和密码必须有一个以大写字母“WX”开头
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

ShopUpdateAsync() public static method

【异步方法】修改门店网络信息
public static ShopUpdateAsync ( string accessTokenOrAppId, long shopId, string oldSsid, string ssid, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
oldSsid string 需要修改的ssid,当门店下有多个ssid时,必填
ssid string 无线网络设备的ssid。32个字符以内;ssid支持中文,但可能因设备兼容性问题导致显示乱码,或无法连接等问题,相关风险自行承担!当门店下是portal型设备时,ssid必填;当门店下是密码型设备时,ssid选填,且ssid和密码必须有一个以大写字母“WX”开头
timeOut int
return Task

WifeRegister() public static method

添加portal型设备
public static WifeRegister ( string accessTokenOrAppId, long shopId, string ssid, string reset, int timeOut = Config.TIME_OUT ) : WiFiRegisterJsonResult
accessTokenOrAppId string
shopId long 门店ID
ssid string 无线网络设备的ssid,限30个字符以内。ssid支持中文,但可能因设备兼容性问题导致显示乱码,或无法连接等问题,相关风险自行承担!
reset string 重置secretkey,false-不重置,true-重置,默认为false
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.WiFi.WiFiRegisterJsonResult

WifeRegisterAsync() public static method

【异步方法】添加portal型设备
public static WifeRegisterAsync ( string accessTokenOrAppId, long shopId, string ssid, string reset, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
shopId long 门店ID
ssid string 无线网络设备的ssid,限30个字符以内。ssid支持中文,但可能因设备兼容性问题导致显示乱码,或无法连接等问题,相关风险自行承担!
reset string 重置secretkey,false-不重置,true-重置,默认为false
timeOut int
return Task