点击或拖拽改变大小
盛派网络

ShakeAroundApiAddLotteryInfoAsync 方法

Senparc.Weixin SDK 官方教程《微信开发深度解析》已出版,支持中国开源事业,请【购买正版】
《微信公众号+小程序》视频课程已经上线,【点击这里】学习!

NeuChar(纽插)已经上线,为开发者提供一站式跨平台管理枢纽,并可将应用入驻到 NeuChar 应用商店!新功能正在不断增加中,快来使用吧! https://www.neuchar.com
在线动态微信接口 Swagger WebApi 文档: https://weixin.senparc.com:8039

【异步方法】创建红包活动

命名空间:  Senparc.Weixin.MP.AdvancedAPIs
程序集:  Senparc.Weixin.MP (在 Senparc.Weixin.MP.dll 中) 版本:16.12.400+09cf0202d5d3e8b12fec87564321e2fafb5f0214
语法
[ApiBindAttribute(PlatformType.WeChat_OfficialAccount, "ShakeAroundApi.AddLotteryInfoAsync", 
	true)]
public static Task<AddLotteryInfoResultJson> AddLotteryInfoAsync(
	string accessTokenOrAppId,
	string title,
	string desc,
	int onoff,
	long beginTime,
	long expireTime,
	string sponsorAppid,
	long total,
	string jumpUrl,
	string key,
	int timeOut = 10000
)

参数

accessTokenOrAppId
类型:SystemString
调用接口凭证
title
类型:SystemString
抽奖活动名称(选择使用模板时,也作为摇一摇消息主标题),最长6个汉字,12个英文字母。
desc
类型:SystemString
抽奖活动描述(选择使用模板时,也作为摇一摇消息副标题),最长7个汉字,14个英文字母。
onoff
类型:SystemInt32
抽奖开关。0关闭,1开启,默认为1
beginTime
类型:SystemInt64
抽奖活动开始时间,unix时间戳,单位秒
expireTime
类型:SystemInt64
抽奖活动结束时间,unix时间戳,单位秒,红包活动有效期最长为91天
sponsorAppid
类型:SystemString
红包提供商户公众号的appid,需与预下单中的公众账号appid(wxappid)一致
total
类型:SystemInt64
红包总数,红包总数是录入红包ticket总数的上限,因此红包总数应该大于等于预下单时红包ticket总数。
jumpUrl
类型:SystemString
红包关注界面后可以跳转到第三方自定义的页面
key
类型:SystemString
开发者自定义的key,用来生成活动抽奖接口的签名参数,长度32位。使用方式见sign生成规则
timeOut (Optional)
类型:SystemInt32
请求超时时间

返回值

类型:TaskAddLotteryInfoResultJson
参见