发帖回帖数据统计
简要描述
- 发帖回帖数据统计
 
版本信息
| 版本号 | 维护人 | 修订日期 | 
|---|---|---|
| v1.0 | 张春梅 | 2020-11-4 | 
请求URL
- POST
 - phpwind : http://www.xxxx.com/clientapi/index.php
 
请求体说明
- 参数说明
 
| 参数名 | 类型 | 是否必须 | 说明 | 
|---|---|---|---|
| action | string | 是 | 方法名必须为 countthread | 
| uids | string | 否 | 用户uid 1,2,4,3 uids为空 或等于0查全网发帖回帖数 | 
| type | int | 否 | 默认0 (用于运营助手) type=1(用于搜索) type=2(根据时间获取主题点赞数) | 
| starttime | int | 是 | 发帖时间区间 开始 当type=1时可以不传开始时间 | 
| endtime | int | 否 | 发帖时间区间 结束 | 
请求实例
define('API' , 'http://bbs1.qianfanyun.com/plugin.php?id=qianfan:index'); // 站点的接口API (phpwind的api  http://xx.xx.xxx/clientapi/index.php)
define('KEY', 'ce2694xxdf1d370b82cxxx8af57d2acb9');
require_once('global.php');
$param = array(
    'action' => 'countthread',
    'uids'=>'3318,4,1',
    'starttime' =>1601534164,
    'endtime' =>1603348565,
);
$str = curl_post_contents( API, $param );
print_r($str);
exit;
响应说明
响应成功示例
// 总量
{
    "errCode":0,
    "errMessage":"",
    "data":{
        "threads":"1",
        "posts":"4"
    }
}
// 用户发帖回帖统计
{
    "errCode":0,
    "errMessage":"",
    "data":{
        "3318":{
            "user_thread":0,
            "user_reply":0
        },
        "4":{
            "user_thread":0,
            "user_reply":0
        },
        "1":{
            "user_thread":"1",
            "user_reply":"3"
        }
    }
}
// 用于搜索
{
    "errCode":0,
    "errMessage":"",
    "data":{
        "threads":"1",
    }
}
// type = 2 根据时间获取主题点赞数
{
    "errCode":0,
    "errMessage":"",
    "data":{
        "thread_pings":"10",
        "reply_pings":0
    }
}
{
    "errCode":527,
    "errMessage":"参数错误"
}
响应成功字段说明
| 参数名 | 类型 | 说明 | 
|---|---|---|
| errCode | int | 错误码 0:成功 !=0败 | 
| errMessage | string | 错误信息 | 
| data | array or object | 具体数据 | 
文档更新时间: 2021-09-09 14:31   作者:毛成