播放时长统计
- 获取用户维度下按小时统计的播放时长,该接口仅提供某一天的数据查询。
地址为:http://spark.bokecc.com/api/stats/playduration/user/hourly
需要传递以下参数:
| 参数 | 说明 | 
|---|---|
| userid | 用户id,不可为空 | 
| date | 查询日期,格式为yyyy-MM-dd,不可为空 | 
返回数据play_durations包含如下字段:
| 字段名 | 说明 | 
|---|---|
| play_duration | 播放时长信息 | 
play_duration包含如下字段:
| 字段名 | 说明 | 
|---|---|
| time | 表示小时的整点时间 | 
| pc | PC端播放时长,单位秒 | 
| mobile | 移动端播时长,单位秒 | 
JSON格式的返回信息如下:
{
"play_durations":{
"play_duration":[
{
"time":"2016-10-19 10:00:00",
"pc":60000,
"mobile":20000
},
…
]
}
}
- 获取用户维度下按天统计的播放时长,该接口提供多天的数据查询。
地址为:http://spark.bokecc.com/api/stats/playduration/user/daily
需要传递以下参数:
| 参数 | 说明 | 
|---|---|
| userid | 用户id,不可为空 | 
| start_date | 查询开始日期(含),格式为yyyy-MM-dd,不可为空 | 
| end_date | 查询结束日期(含),格式为yyyy-MM-dd,不可为空 | 
返回数据play_durations包含如下字段: |字段名|说明| |---|---| |play_duration|播放时长信息|
play_duration包含如下字段: |字段名|说明| |---|---| |date|表示天的日期时间| |pc|PC端播放时长,单位秒| |mobile|移动端播放时长,单位秒|
JSON格式的返回信息如下:
{
"play_durations":{
"play_duration":[
{
"date":"2016-10-19",
"pc":60000,
"mobile":120000
},
…
]
}
}
- 获取视频维度下按小时统计的播放时长,该接口仅提供某一天的数据查询。
地址为:http://spark.bokecc.com/api/stats/playduration/video/hourly
需要传递以下参数:
| 参数 | 说明 | 
|---|---|
| userid | 用户id,不可为空 | 
| videoid | 视频id,不可为空 | 
| date | 查询日期,格式为yyyy-MM-dd,不可为空 | 
返回数据play_durations包含如下字段:
| 字段名 | 说明 | 
|---|---|
| play_duration | 播放时长信息 | 
play_duration包含如下字段:
| 字段名 | 说明 | 
|---|---|
| time | 表示小时的整点时间 | 
| pc | PC端播放时长,单位秒 | 
| mobile | 移动端播放时长,单位秒 | 
JSON格式的返回信息如下:
{
"play_durations":{
"play_duration":[
{
"time":"2016-10-19 10:00:00",
"pc":60000,
"mobile":120000
},
…
]
}
}
- 获取视频维度下按天统计的播放时长,该接口提供多天的数据查询。
地址为:http://spark.bokecc.com/api/stats/playduration/video/daily
需要传递以下参数:
| 参数 | 说明 | 
|---|---|
| userid | 用户id,不可为空 | 
| videoid | 视频id,不可为空 | 
| start_date | 查询开始日期(含),格式为yyyy-MM-dd,不可为空 | 
| end_date | 查询结束日期(含),格式为yyyy-MM-dd,不可为空 | 
返回数据play_durations包含如下字段:
| 字段名 | 说明 | 
|---|---|
| play_duration | 播放时长信息 | 
play_duration包含如下字段:
| 字段名 | 说明 | 
|---|---|
| date | 表示天的日期时间 | 
| pc | PC端播放时长,单位秒 | 
| mobile | 移动端播放时长,单位秒 | 
JSON格式的返回信息如下:
{
"play_durations":{
"play_duration":[
{
"date":"2016-10-19",
"pc":10000,
"mobile":20000
},
…
]
}
}
 
           
              
              
              
