获取用户维度下按小时统计的播放时长
更新时间:2020-9-30
1. v2版本
接口描述
该接口用于获取用户维度下按小时统计的播放时长,请求参数和v1相同,返回数据中play_duration包含字段和v1有所不同。
请求地址
https://spark.bokecc.com/api/stats/playduration/user/hourly/v2
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
名称 |
类型 |
必填 |
描述 |
userid |
String |
是 |
用户ID。 |
date |
String |
是 |
查询日期,日期不能大于今日,格式:yyyy-MM-dd。 |
请求示例
https://spark.bokecc.com/api/stats/playduration/user/hourly/v2?date=2016-10-19&videoid=6D080640AF53B5D363835A29B2A11xxx&time=1671521568988&userid=CC443A6686737xxx&hash=026FF8D60CC4D18A2E74063684BC8FF0
返回数据
名称 |
类型 |
说明 |
play_durations |
Object |
播放时长 |
play_durations说明
名称 |
类型 |
说明 |
play_duration |
Array |
播放时长信息。 |
play_duration说明
名称 |
类型 |
说明 |
time |
String |
表示小时的时间字符串,格式为:yyyy-MM-dd HH:mm:ss。 |
flash |
Integer |
Flash端播放时长,单位:秒。 |
pc_h5 |
Integer |
H5-PC端播放时长,单位:秒。 |
android |
Integer |
Android端播放时长,单位:秒。 |
ios |
Integer |
iOS端播放时长,单位:秒。 |
mobile_h5 |
Integer |
H5-移动端播放时长,单位:秒。 |
返回示例
{
"play_durations": {
"play_duration": [
{
"flash": 10000,
"android": 20000,
"ios": 10000,
"time": "2016-10-19 00:00:00",
"pc_h5": 30000,
"mobile_h5": 30000
},
{
"flash": 20000,
"android": 10000,
"ios": 30000,
"time": "2016-10-19 01:00:00",
"pc_h5": 50000,
"mobile_h5": 20000
},
......
]
}
}
2. v1版本
接口描述
该接口用于获取用户维度下按小时统计的播放时长。
请求地址
https://spark.bokecc.com/api/stats/playduration/user/hourly
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
名称 |
类型 |
必填 |
描述 |
userid |
String |
是 |
用户ID。 |
date |
String |
是 |
查询日期,日期不能大于今日,格式:yyyy-MM-dd。 |
请求示例
https://spark.bokecc.com/api/stats/playduration/user/hourly?date=2016-10-19&videoid=6D080640AF53B5D363835A29B2A11xxx&time=1671521568988&userid=CC443A6686737xxx&hash=026FF8D60CC4D18A2E74063684BC8FF0
返回数据
名称 |
类型 |
说明 |
play_durations |
Object |
播放时长。 |
play_durations说明
名称 |
类型 |
说明 |
play_duration |
Array |
播放时长信息。 |
play_duration说明
名称 |
类型 |
说明 |
time |
String |
表示小时的整点时间。 |
pc |
Integer |
PC端播放时长,单位:秒。 |
mobile |
Integer |
移动端播时长,单位:秒。 |
返回示例
{
"play_durations": {
"play_duration": [
{
"time": "2016-10-19 00:00:00",
"pc": 60000,
"mobile": 20000
},
{
"time": "2016-10-19 01:00:00",
"pc": 30000,
"mobile": 40000
},
......
]
}
}