获取用户维度下按小时统计的观众量
更新时间:2020-9-30
1. v2版本
接口描述
该接口用于获取用户维度下按小时统计的观众量,请求参数和v1相同,返回数据中unique_visitor包含字段和v1有所不同。
请求地址
https://spark.bokecc.com/api/stats/uniquevisitor/user/hourly/v2
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
名称 |
类型 |
必填 |
描述 |
userid |
String |
是 |
用户ID。 |
date |
String |
是 |
查询日期,日期不能大于今日,格式:yyyy-MM-dd。 |
请求示例
https://spark.bokecc.com/api/stats/uniquevisitor/user/hourly/v2?date=2016-10-19&time=1671536527042&userid=CC443A6686737xxx&hash=4E5735AFC9AD2CAF76CF18ACC9E13527
返回数据
名称 |
类型 |
说明 |
unique_visitors |
Object |
观众量。 |
unique_visitors说明
名称 |
类型 |
说明 |
unique_visitor |
Array |
观众量信息。 |
unique_visitor说明
名称 |
类型 |
说明 |
time |
String |
表示小时的时间字符串,格式:yyyy-MM-dd HH:mm:ss。 |
total |
Integer |
全终端观众量。 |
flash |
Integer |
Flash端观众量。 |
pc_h5 |
Integer |
H5-PC端观众量。 |
android |
Integer |
Android端观众量。 |
ios |
Integer |
iOS端观众量。 |
mobile_h5 |
Integer |
H5-移动端观众量。 |
返回示例
{
"unique_visitors": {
"unique_visitor": [
{
"time": "2016-10-19 00:00:00",
"total": 70000,
"flash": 10000,
"pc_h5": 20000,
"android": 10000,
"ios": 10000,
"mobile_h5": 20000
},
{
"time": "2016-10-19 01:00:00",
"total": 130000,
"flash": 70000,
"pc_h5": 10000,
"android": 20000,
"ios": 10000,
"mobile_h5": 20000
},
......
]
}
}
2. v1版本
接口描述
该接口用于获取用户维度下按小时统计的观众量。
请求地址
https://spark.bokecc.com/api/stats/uniquevisitor/user/hourly
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
名称 |
类型 |
必填 |
描述 |
userid |
String |
是 |
用户ID。 |
date |
String |
是 |
查询日期,日期不能大于今日,格式:yyyy-MM-dd。 |
请求示例
https://spark.bokecc.com/api/stats/uniquevisitor/user/hourly?date=2016-10-19&time=1671536127636&userid=CC443A6686737xxx&hash=99642B87E5083CC6B2B34A4A0FC4DB98
返回数据
名称 |
类型 |
说明 |
unique_visitors |
Object |
观众量。 |
unique_visitors说明
名称 |
类型 |
说明 |
unique_visitor |
Array |
观众量信息。 |
unique_visitor说明
名称 |
类型 |
说明 |
time |
String |
表示小时的整点时间。 |
total |
Integer |
总观众量。 |
pc |
Integer |
PC端观众量。 |
mobile |
Integer |
移动端观众量。 |
返回示例
{
"unique_visitors": {
"unique_visitor": [
{
"time": "2016-10-19 00:00:00",
"total": 29999,
"pc": 10000,
"mobile": 20000
},
{
"time": "2016-10-19 01:00:00",
"total": 29999,
"pc": 10000,
"mobile": 20000
},
......
]
}
}