后端接口文档
Dove API
签到接口
/attend
POST - Request
form
{
'address': '0x1d5EbE01F72652Fab2ec9F50195b4eE24d0dA666',
}
- Response
{
'code': 0,
'data': null,
'msg': 'Success',
}
点赞接口
/like/create
POST - Request
json
{
'data': {
'address_from': '0x1d5EbE01F72652Fab2ec9F50195b4eE24d0dA666',
'address_to': '0x1d5EbE01F72652Fab2ec9F50195b4eE24d0dA777',
'reason': '{...}', // 自定义格式, json string
'tags': ['tag1', 'tag2'],
}
}
- Response
success
点赞记录listing接口
/like/
GET - Request
query
address_from: '', // 可选
address_to: '', // 可选
ts_start: 1534392000, // 可选
ts_end: 1534392100, // 可选
offset: 0, // 默认0
limit: 10, // 默认10
- Response
data: [
{ // like record detail
address_from: '',
address_to: '',
reason: '{...}',
tags: ['tag1', 'tag2'],
candy_value_from: '', // 地址
candy_value_to: '', // 地址
},
{ // like record detail
},
...
]
点赞记录detail接口
/like/{record_id}
GET - Request
- Response
data: {
address_from: '',
address_to: '',
reason: '{...}',
tags: ['tag1', 'tag2'],
candy_value_from: '',
candy_value_to: '',
user_from: { // user detail
},
user_to: { // user detail
},
}
点赞记录标签推荐接口
/like/tag/rec
GET - Request
- Response
data: ['tag1', 'tag2', 'tag3', 'tag4', 'tag5'] // 从使用最多的5个加上随机的5个,10个里随机取5个
今日动态接口
/feeds/today
GET - Request
query
offset: 0 // 默认0
limit: 10 // 默认10
- Response
data: {
pol: [
{ // PoL Record detail
address_from: '',
address_to: '',
reason: '',
tags: ['tag1', 'tag2'],
candy_value_from: '',
candy_value_to: '',
},
{},
...
]
poc: [
{ // PoC Record detail
address: '',
candy_value: 1,
},
{},
...
]
...
]
今日点赞动态接口
/feeds/pol/today
GET - Request
query
offset: 0 // 默认0
limit: 10 // 默认10
- Response
data: [
{ // PoL Record detail
id: 123,
address_from: '',
address_to: '',
reason: '',
tags: ['tag1', 'tag2'],
candy_value_from: '',
candy_value_to: '',
user_from: {
// user detail
},
user_to: {
// user detail
},
created_at: 12345678901,
updated_at: 12345678901,
},
{},
...
]
历史点赞接口
/feeds/pol/
GET - Request
query
offset: 0 // 默认0
limit: 10 // 默认10
- Response
data: [
{ // PoL Record detail
id: 123,
address_from: '',
address_to: '',
reason: '',
tags: ['tag1', 'tag2'],
candy_value_from: '',
candy_value_to: '',
user_from: {
// user detail
},
user_to: {
// user detail
},
created_at: 12345678901,
updated_at: 12345678901,
},
{},
...
]
昨日统计接口
/stats/yesterday
GET - Request
query
address: ''
- Response
{
yxt: 100.2,
candy: 666,
yxt_candy_ratio: 0.1222,
total_candy: 8242,
}
个人收益统计接口
/stats/settlement/
GET - Request
query
address: ''
- Response
[
{
address: '0x00000000000000000...000',
total_yxt: 1000,
total_candy: 6000,
yxt_components: {
poc: 1.5,
pol: 998.5,
},
candy_components: {
poc: 1,
pol: 5999,
},
yxt_candy_ratio: 6,
date: 12345678901,
},
{},
...
]
YXT交易记录接口
/transaction/
GET - Request
query
address: '' // address_from == address OR address_to == address
address_from: ''
address_to: ''
offset: 0
limit: 10
- Response
data: [
{ // transaction detail
address_from: '',
address_to: '',
value: 1000,
memo: '', // 取值:'poc', 'pol', 'gift_id: 123'
}
]
用户详情接口
/user/{user_id}
GET - Request
query
- Response
{
"created_at": 1534212585,
"updated_at": 1534216907,
"id": 15,
"name": "王䶮卿",
"position": "后端开发工程师",
"mobile": "18930587767",
"avatar": "http://shp.qpic.cn/bizmp/QmOzyjI2DUKdzzrpbgX1wpgOWFr65bwDqgf8hzqXC51zkD7XQb7PpQ/",
"corp_wx_user_id": "wangyanqing@baixing.com",
"gender": 1,
"status": 1,
"department_id": 159,
"department_name": "广告技术",
"enterprise_id": 1,
"address": "0x1234567890123456789012345678901234567890",
"balance": 1000.234,
"bonus_components": {
"poc": 1000,
"pol": 0.234,
},
}
当前用户详情接口
/user/current
GET - Request
query
- Response
{
"created_at": 1534212585,
"updated_at": 1534216907,
"id": 15,
"name": "王䶮卿",
"position": "后端开发工程师",
"mobile": "18930587767",
"avatar": "http://shp.qpic.cn/bizmp/QmOzyjI2DUKdzzrpbgX1wpgOWFr65bwDqgf8hzqXC51zkD7XQb7PpQ/",
"corp_wx_user_id": "wangyanqing@baixing.com",
"gender": 1,
"status": 1,
"department_id": 159,
"department_name": "广告技术",
"enterprise_id": 1,
"address": "0x1234567890123456789012345678901234567890",
"balance": 1000.234,
"bonus_components": {
"poc": 1000,
"pol": 0.234,
},
}
所有用户信息接口
/user
GET - Request
query
keyword: ''
offset: 0
limit: 10
- Response
[{
"created_at": 1534212585,
"updated_at": 1534216907,
"id": 15,
"name": "王䶮卿",
"position": "后端开发工程师",
"mobile": "18930587767",
"avatar": "http://shp.qpic.cn/bizmp/QmOzyjI2DUKdzzrpbgX1wpgOWFr65bwDqgf8hzqXC51zkD7XQb7PpQ/",
"corp_wx_user_id": "wangyanqing@baixing.com",
"gender": 1,
"status": 1,
"department_id": 159,
"department_name": "广告技术",
"enterprise_id": 1
}]
礼物列表接口
/gift/
POST form
- Request
- Response
[
{
'id': 1,
'name': '单身薯片',
'value': 18,
'image_url': 'http://...',
},
{ // gift detail },
...
]
礼物兑换接口
/gift/redeem
POST form
- Request
address_from: '0x00000000000..000'
gift_id: 123
- Response
success
礼物兑换记录接口
/gift/redemptions/
GET - Request
address_from: '0x00000000000..000'
offset: 0 // 可选
limit: 10 // 可选
- Response
[
{
'id': 12,
'name': 'iPad Pro',
'value': 3999,
'created_at': 12345678901,
},
{},
...
]
配置接口 - 文案
/config/text
GET - Request
- Response
{
'action': {
'title': '行为',
'content': '请简单描述一下TA的优秀行为',
},
'result': {
'title': '结果',
'content': '那么,该优秀行为的结果是',
}
}