获取用户维度下按天统计的播放时长
更新时间:2020-9-30
1. v2版本
接口描述
该接口用于获取用户维度下按天统计的播放时长,请求参数和v1相同,返回数据中play_duration包含字段和v1有所不同。
请求地址
https://spark.bokecc.com/api/stats/playduration/user/daily/v2
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
名称 |
类型 |
必填 |
描述 |
userid |
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/user/daily/v2?end_date=2016-10-19&time=1671523978965&userid=CC443A6686737xxx&hash=4540C73C9939923A8CAA2F1EACB37E4F&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": 12000,
"pc_h5": 23000,
"android": 14000,
"ios": 23000,
"mobile_h5": 40000
}
]
}
}
2. v1版本
接口描述
该接口用于获取用户维度下按天统计的播放时长。
请求地址
https://spark.bokecc.com/api/stats/playduration/user/daily
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
名称 |
类型 |
必填 |
描述 |
userid |
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/user/daily?end_date=2016-10-19&time=1671523978965&userid=CC443A6686737xxx&hash=4540C73C9939923A8CAA2F1EACB37E4F&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": 60000,
"mobile": 120000
},
{
"date": "2016-10-19",
"pc": 80000,
"mobile": 150000
}
]
}
}