OkayAPI Docs


API Path: /api/App/Guest_Counter/Update

API Description: 游客可以增量更新用户的日/周/月/年计数器,可增加/减少,value为正数增加,为负数则减少。

1
API Traffic
HTTP/HTTPS
Protocol
GET/POST
Method
UTF-8
Charset
JSON
Response

API Debug   


API Params

ParameterTypeRequiredDefaultNoteDescription
HTTP_APPKEYStringRequiredMIN: 32Common Put Your APPKEY
uuidStringOptaionMIN: 32;MAX: 32UUID,全局唯一用户ID
tokenStringOptaionMIN: 64;MAX: 64会话凭证
typeEnumRequiredRange: hour/day/week/month/year/forever计数器类型,时/日/周/月/年/永久计数器
nameStringRequiredMIN: 1;MAX: 64计数器名称
other_uuidStringRequiredMIN: 32;MAX: 32游客针对的UUID,全局唯一用户ID
valueIntRequired1待增量更新的值,为正数时增加,为负数则减少

API Debug

KEYREQUIREDVALUE
app_key *Required
uuid Option
token Option
type *Required
name *Required
other_uuid *Required
value *Required

API Response

KEYTypeDescription
err_codeInt状态操作码,0成功,1计数器不存在
err_msgString错误提示信息,err_code非0时参考此提示信息
before_valueInt更新前原来的值
after_valueInt更新后的值
add_valueInt服务端实际累加的值(尽可能累加的值,即在不超出最值的情况下尽最大可能累加的值)
valueInt客户端期望累加的值

HTTP Response Code

HTTP Status CodeDescription
Http Status = 200Success
Http Status = 400Illegal-Params
Http Status = 401Illegal-Token
Http Status = 402IP-Banned
Http Status = 404API-NOT-Exsits
Http Status = 406Illegal-APPKEY
Http Status = 407APPKEY-Expired-Out
Http Status = 408APPKEY-Busy
Http Status = 409Illegal-Sign
Http Status = 413API-Traffic-NOT-Enough
Http Status = 415API-LOCKED
Http Status = 500Internal-Server-Error