@elibinary
2016-10-28T06:46:23.000000Z
字数 2736
阅读 767
doc
status.add_diamond
用于加钻石
参数名 | 说明 |
---|---|
user_key | user_key |
count | 数量 |
change_type | 加钻类型,例如:『签到』『记录体重』『计步奖励』等 |
identity | 参数类型为 integer, foreign key 的值,可省略 |
{
user_key: user_key,
count: 100,
change_type: STEP_DIAMOND,
identity: object.id
}
status.extend_light
用于点亮用户头像
参数名 | 说明 |
---|---|
user_key | user_key |
time | 参数类型为 integer ,表示天数 |
{
user_key: user_key,
time: 10
}
status.follow_public_account
用于关注公众账号接口(follower)
参数名 | 说明 |
---|---|
user_key | user_key |
account | 可取值:'shop' or 'service', 如为 'service' 则表示关注「NICE服务」公众号 |
{
user_key: user_key,
account: 'service'
}
status.pay_notify
用于接收 pingpp 支付结果通知,此处主要用于赌瘦订单支付结果的回调
pingpp 支付结果的回调参数
例:
{
"id" => "evt_9LGm1cFqqx6OrD5zD4rI6YuG",
"created" => 1458280536,
"livemode" => false,
"data" => {
"object" => {
"id" => "ch_yzLiP4fHiDiTeTyLCKOC8urD",
"object" => "charge",
"created" => 1458280534,
"livemode" => false,
"paid" => true,
"refunded" => false,
"app" => "app_f9yb50vPenXL5eXj",
"channel" => "wx",
"order_no" => 'wx20180415095200T639136',
"client_ip" => "58.246.136.4",
"amount" => (100).to_i,
"amount_settle" => 1001,
"currency" => "cny",
"subject" => "薄荷科技" ,
"body" => "超模25营养饮(超值套餐)*1,订单号T587221,支付单号payment_no: AP20160318135534T587221" ,
"extra" => {
"buyer_account" => "alipay_account"
},
"time_paid" => 1458280536,
"time_expire" => 1458366934,
"time_settle" => nil,
"transaction_no" => "2016031881679598",
"refunds" => {
"object" => "list",
"url" => "/v1/charges/ch_yzLiP4fHiDiTeTyLCKOC8urD/refunds",
"has_more" => false,
"data" => nil
},
"amount_refunded" => 0,
"failure_code" => nil,
"failure_msg" => nil,
"metadata" => {},
"credential" => {},
"description" => nil
}
},
"object" => "event",
"pending_webhooks" => 8,
"request" => "iar_Wvv1iDLGyzfPHuDyHGzLCmnT",
"action" => "pay_notify",
"controller" => "payments",
"payment" => {
"id" => "evt_9LGm1cFqqx6OrD5zD4rI6YuG",
"type" => "charge.succeeded"
},
"time_now" => "2016-04-15 13:23:12 +0800"
"status" => 200
}
status.reduce_diamond
用于减少钻石(扣除钻石)
参数名 | 说明 |
---|---|
user_key | user_key |
count | 数量 |
change_type | 加钻类型,例如:『签到』『记录体重』『计步奖励』等 |
identity | 可选参数,参数类型为 integer, foreign key 的值 |
with_prevent | 可选参数,如果传此参数,则必须传递 identity 参数,表示在有同类型记录的情况下才会去执行减少操作 |
{
user_key: user_key,
count: 100,
change_type: STEP_DIAMOND,
identity: object.id
}
status.sports_envious.v2
用于运动加钻石或减钻石
参数名 | 说明 |
---|---|
user_key | user_key |
envious | 钻石数量,为正数时表示加钻石,为负数时表示减钻石 |
{
user_key: user_key,
envious: 100
}
broadcast.passport.user_profile_changed
用于同步 user profile
参数名 | 说明 |
---|---|
user_key | user_key |
avatar_url | 头像 |
sex_type | 性别 |
height | 身高 |
begin_weight | 开始体重 |
user_name | 用户昵称 |
description | 描述 |
birthday | 生日 |
location | location |
status.update_profile
用于同步更新用户 description
参数名 | 说明 |
---|---|
user_key | user_key |
description | 描述 |
status.user_report
用于统计用户给定时间段内的动态数和评论数
参数名 | 说明 |
---|---|
user_key | user_key |
begin_date | 开始日期 |
end_date | 结束日期 |
{
:user_key=>"bfefda8d-f63d-4d56-b1f9-d022062c290d",
:begin_date=>"2016-07-24",
:end_date=>"2016-07-30"
}