跳到主要内容

动态

GEThttps://open.debox.pro/openapi/moment/praise_info

获取钱包地址对应用户发的所有动态获得的点赞信息,使用示例:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/moment/praise_info?\
wallet_address=0x2267......&chain_id=1"

Parameters

app_id : String 应用唯一标识,在DeBox开放平台申请

X-API-KEY : String 开发者 API Key,在DeBox开放平台获取

nonce : String 随机数字,长度 8 位

timestamp : String 时间戳,精确到毫秒

signature : String 签名,需严格按照下方的签名计算规则计算

  • 签名计算规则:

    // 顺序必须必须严格按:appsecret -> nonce -> timestamp
    signature = SHA1({appsecret}{nonce}{timestamp})
  • 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名

  • appsecret: 开发者 App Secret,在DeBox开放平台获取

    Query

    wallet_address : 钱包地址,代表某个用户

    chain_id : 区块链网络ID,默认值1,以太坊主网

    Responses

    200: OK
    # receive_praise_total 自己获得的点赞总数
    # send_praise_total 给别人点赞的总数
    {
    "code": 1,
    "data": {
    "receive_praise_total": 46,
    "send_praise_total": 208
    },
    "message": "success",
    "success": true
    }
    400: Bad Request
    {"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

GEThttps://open.debox.pro/openapi/moment/give_praise

判断某个用户是否给某条动态点赞,使用示例:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/moment/give_praise?\
wallet_address=0x2267......&chain_id=1&moment_id=oo0epx1p"

Parameters

Header

app_id : String 应用唯一标识,在DeBox开放平台申请

X-API-KEY : String 开发者 API Key,在DeBox开放平台获取

nonce : String 随机数字,长度 8 位

timestamp : String 时间戳,精确到毫秒

signature : String 签名,需严格按照下方的签名计算规则计算

  • 签名计算规则:

    // 顺序必须必须严格按:appsecret -> nonce -> timestamp
    signature = SHA1({appsecret}{nonce}{timestamp})
  • 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名

  • appsecret: 开发者 App Secret,在DeBox开放平台获取

    Query

    wallet_address : 钱包地址,代表某个用户

    chain_id : 区块链网络ID,默认值1,以太坊主网

    moment_id : 动态ID,代表某个动态

    Responses

    200: OK
    # is_praise 是否已点赞
    {
    "code": 1,
    "data": {
    "is_praise": false
    },
    "message": "success",
    "success": true
    }
    400: Bad Request
    {"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

GEThttps://open.debox.pro/openapi/moment/receive_praise

获取某个动态点赞总数、以及所有点赞用户,使用示例:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/moment/receive_praise?moment_id=oo0epx1p"

Parameters

Header

app_id : String 应用唯一标识,在DeBox开放平台申请

X-API-KEY : String 开发者 API Key,在DeBox开放平台获取

nonce : String 随机数字,长度 8 位

timestamp : String 时间戳,精确到毫秒

signature : String 签名,需严格按照下方的签名计算规则计算

  • 签名计算规则:

    // 顺序必须必须严格按:appsecret -> nonce -> timestamp
    signature = SHA1({appsecret}{nonce}{timestamp})
  • 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名

  • appsecret: 开发者 App Secret,在DeBox开放平台获取

    Query

    moment_id : 动态ID,代表某个动态

    Responses

    200: OK
    # receive_praise_total  被点赞数
    {
    "code": 1,
    "data": {
    "receive_praise_total": 1
    "praise_users":[{"name":"xxx","wallet_address":"0x3e52...","avatar":"https://data...png","uid":"0yz..."}]
    },
    "message": "success",
    "success": true
    }
    400: Bad Request
    {"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}