53
53
### 2.1 获取所有分类信息
54
54
PATH:` GET /api/v1/category/ `
55
55
56
+ 参数:无
57
+
56
58
响应:
57
59
```
58
60
{
@@ -102,8 +104,8 @@ PATH:`GET /api/v1/volume/`
102
104
比如:要请求 2019年11月16日 的数据,则 start_time 为 2019年11月16日00:00:00,end_time 为 2019年11月17日00:00:00
103
105
104
106
** Tips:** 默认返回昨天的数据,时间戳单位为秒。
105
- ** Tips:** 如果两者时间间隔超过30天 ,以开始时间为准,结束时间为开始时间往后推30天。
106
- ** Tips:** 排序列:文档中枚举第一个字段是默认的排序字段
107
+ ** Tips:** 如果两者时间间隔超过 31 天 ,以开始时间为准,结束时间为开始时间往后推 31 天。
108
+ ** Tips:** 排序列:文档中枚举第一个字段是默认的排序字段。
107
109
108
110
### 3.1 获取首页汇总展示数据
109
111
该接口用于统计首页汇总展示所有图表的概括图。
@@ -117,11 +119,11 @@ PATH:`GET /api/v1/traffic/views/`
117
119
118
120
参数:
119
121
120
- | 名称 | 必须 | 类型 | 描述 |
122
+ | 名称 | 必须 | 类型 | 描述 |
121
123
| ------- | ----- | ----- | ----- |
122
- | event | 是 | string | 请求事件名的统计数据 |
123
- | start_time | 否 | int | 开始时间戳 |
124
- | end_time | 否 | int | 结束时间戳 |
124
+ | event | 是 | string | 请求事件名 (from,click,volume,notice) |
125
+ | start_time | 否 | int | 开始时间戳 |
126
+ | end_time | 否 | int | 结束时间戳 |
125
127
126
128
响应:
127
129
** Tips:** 每次请求返回一种 event 的数据,提高数据返回效率。
@@ -162,7 +164,7 @@ PATH:`GET /api/v1/traffic/views/`
162
164
]
163
165
},
164
166
165
- #某一期月刊的数据(只显示最近一期和选择的时间无关, event=click )
167
+ #某一期月刊的数据(只显示最近一期和选择的时间无关, event=volume )
166
168
"view_data": {
167
169
"all_count": 100,
168
170
"all_ip_count": 22,
@@ -206,8 +208,8 @@ PATH:`GET /api/v1/traffic/from/view/`
206
208
207
209
| 名称 | 必须 | 类型 | 描述 |
208
210
| ------- | ----- | ----- | ----- |
209
- | start_time | 否 | int | 开始时间戳 |
210
- | end_time | 否 | int | 结束时间戳 |
211
+ | start_time | 否 | int | 开始时间戳 |
212
+ | end_time | 否 | int | 结束时间戳 |
211
213
212
214
响应:
213
215
```
@@ -239,21 +241,21 @@ PATH:`GET /api/v1/traffic/from/view/`
239
241
}
240
242
```
241
243
242
- ### 3.3 获取用户访问来源详细数据
244
+ ### 3.3 获取用户访问来源详细数据 (废弃不用)
243
245
244
246
返回用户访问统计页面下的列表数据。
245
247
246
248
PATH:` GET /api/v1/traffic/from/detail/ `
247
249
248
250
参数:
249
251
250
- | 名称 | 必须 | 类型 | 描述 |
252
+ | 名称 | 必须 | 类型 | 描述 |
251
253
| ------- | ----- | ----- | ----- |
252
- | page | 否 | int | 页数默认为第一页 |
253
- | order | 否 | string | 排序列(stars,count,ip_count) |
254
- | asc | 否 | int | 默认为0降序,1为升序 |
255
- | start_time | 否 | int | 开始时间戳 |
256
- | end_time | 否 | int | 结束时间戳 |
254
+ | page | 否 | int | 页数默认为第一页 |
255
+ | order | 否 | string | 排序列(stars,count,ip_count) |
256
+ | asc | 否 | int | 默认为0降序,1为升序 |
257
+ | start_time | 否 | int | 开始时间戳 |
258
+ | end_time | 否 | int | 结束时间戳 |
257
259
258
260
响应:
259
261
```
@@ -292,8 +294,8 @@ PATH:`GET /api/v1/traffic/click/view/`
292
294
293
295
| 名称 | 必须 | 类型 | 描述 |
294
296
| ------- | ----- | ----- | ----- |
295
- | start_time | 否 | int | 开始时间戳 |
296
- | end_time | 否 | int | 结束时间戳 |
297
+ | start_time | 否 | int | 开始时间戳 |
298
+ | end_time | 否 | int | 结束时间戳 |
297
299
298
300
响应:
299
301
```
@@ -331,11 +333,11 @@ PATH:`GET /api/v1/traffic/click/detail/`
331
333
332
334
| 名称 | 必须 | 类型 | 描述 |
333
335
| ------- | ----- | ----- | ----- |
334
- | page | 否 | int | 页数默认为第一页 |
335
- | order | 否 | string | 排序列(stars,count,ip_count) |
336
- | asc | 否 | int | 默认为0降序,1为升序 |
337
- | start_time | 否 | int | 开始时间戳 |
338
- | end_time | 否 | int | 结束时间戳 |
336
+ | page | 否 | int | 页数默认为第一页 |
337
+ | order | 否 | string | 排序列(stars,count,ip_count) |
338
+ | asc | 否 | int | 默认为0降序,1为升序 |
339
+ | start_time | 否 | int | 开始时间戳 |
340
+ | end_time | 否 | int | 结束时间戳 |
339
341
340
342
响应:
341
343
```
@@ -381,8 +383,8 @@ PATH:`GET /api/v1/traffic/periodical/view/`
381
383
382
384
| 名称 | 必须 | 类型 | 描述 |
383
385
| ------- | ----- | ----- | ----- |
384
- | volume_id | 否 | int | 期刊的id,默认为最新一期 |
385
- | category_id | 否 | int | 期刊分类的id,默认返回所有分类的数据|
386
+ | volume_id | 否 | int | 期刊的id,默认为最新一期 |
387
+ | category_id | 否 | int | 期刊分类的id,默认返回所有分类的数据|
386
388
387
389
响应:
388
390
```
@@ -418,10 +420,10 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
418
420
419
421
| 名称 | 必须 | 类型 | 描述 |
420
422
| ------- | ----- | ----- | ----- |
421
- | volume_id | 否 | int | 期刊的id,默认为最新一期 |
422
- | page | 否 | int | 页数默认为第一页 |
423
- | order | 否 | string | 排序列(stars,count,ip_count) |
424
- | asc | 否 | int | 默认为0降序,1为升序 |
423
+ | volume_id | 否 | int | 期刊的id,默认为最新一期 |
424
+ | page | 否 | int | 页数默认为第一页 |
425
+ | order | 否 | string | 排序列(stars,count,ip_count) |
426
+ | asc | 否 | int | 默认为0降序,1为升序 |
425
427
426
428
427
429
响应:
@@ -456,8 +458,6 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
456
458
```
457
459
458
460
459
-
460
-
461
461
## 四、日报汇总展示接口
462
462
463
463
日报汇总展示接口时间范围字段:
@@ -480,8 +480,8 @@ PATH:`GET /api/v1/daily/langs/`
480
480
481
481
| 名称 | 必须 | 类型 | 描述 |
482
482
| ------- | ----- | ----- | ----- |
483
- | start_time | 否 | int | 开始时间戳 |
484
- | end_time | 否 | int | 结束时间戳 |
483
+ | start_time | 否 | int | 开始时间戳 |
484
+ | end_time | 否 | int | 结束时间戳 |
485
485
486
486
响应:
487
487
```
@@ -503,12 +503,12 @@ PATH:`GET /api/v1/daily/report/`
503
503
504
504
| 名称 | 必须 | 类型 | 描述 |
505
505
| ------- | ----- | ----- | ----- |
506
- | start_time | 否 | int | 开始时间戳 |
507
- | end_time | 否 | int | 结束时间戳 |
506
+ | start_time | 否 | int | 开始时间戳 |
507
+ | end_time | 否 | int | 结束时间戳 |
508
508
| lang | 否 | string | 语言 |
509
- | page | 否 | int | 页数默认为第一页 |
510
- | order | 否 | string | 排序列(stars、 forks、 repo_pushed_time)|
511
- | asc | 否 | int | 默认为 0 降序,1 为升序 |
509
+ | page | 否 | int | 页数默认为第一页 |
510
+ | order | 否 | string | 排序列(stars, forks, repo_pushed_time)|
511
+ | asc | 否 | int | 默认为 0 降序,1 为升序 |
512
512
513
513
** Tips:** 排序列文档中枚举第一个字段是默认的排序字段
514
514
0 commit comments