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