Skip to content

Commit 03a284c

Browse files
authored
Merge pull request #2 from 719923505/master
check api doc
2 parents db96ec0 + 83e40f5 commit 03a284c

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

doc/api.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
### 2.1 获取所有分类信息
5454
PATH:`GET /api/v1/category/`
5555

56+
参数:无
57+
5658
响应:
5759
```
5860
{
@@ -102,8 +104,8 @@ PATH:`GET /api/v1/volume/`
102104
比如:要请求 2019年11月16日 的数据,则 start_time 为 2019年11月16日00:00:00,end_time 为 2019年11月17日00:00:00
103105

104106
**Tips:** 默认返回昨天的数据,时间戳单位为秒。
105-
**Tips:** 如果两者时间间隔超过30天,以开始时间为准,结束时间为开始时间往后推30天。
106-
**Tips:** 排序列:文档中枚举第一个字段是默认的排序字段
107+
**Tips:** 如果两者时间间隔超过 31 天,以开始时间为准,结束时间为开始时间往后推 31 天。
108+
**Tips:** 排序列:文档中枚举第一个字段是默认的排序字段
107109

108110
### 3.1 获取首页汇总展示数据
109111
该接口用于统计首页汇总展示所有图表的概括图。
@@ -117,11 +119,11 @@ PATH:`GET /api/v1/traffic/views/`
117119

118120
参数:
119121

120-
| 名称 | 必须 | 类型 | 描述 |
122+
| 名称 | 必须 | 类型 | 描述 |
121123
| ------- | ----- | ----- | ----- |
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 | 结束时间戳 |
125127

126128
响应:
127129
**Tips:** 每次请求返回一种 event 的数据,提高数据返回效率。
@@ -162,7 +164,7 @@ PATH:`GET /api/v1/traffic/views/`
162164
]
163165
},
164166
165-
#某一期月刊的数据(只显示最近一期和选择的时间无关,event=click
167+
#某一期月刊的数据(只显示最近一期和选择的时间无关event=volume
166168
"view_data": {
167169
"all_count": 100,
168170
"all_ip_count": 22,
@@ -206,8 +208,8 @@ PATH:`GET /api/v1/traffic/from/view/`
206208

207209
| 名称 | 必须 | 类型 | 描述 |
208210
| ------- | ----- | ----- | ----- |
209-
| start_time | | int | 开始时间戳 |
210-
| end_time | | int | 结束时间戳 |
211+
| start_time || int | 开始时间戳 |
212+
| end_time || int | 结束时间戳 |
211213

212214
响应:
213215
```
@@ -239,21 +241,21 @@ PATH:`GET /api/v1/traffic/from/view/`
239241
}
240242
```
241243

242-
### 3.3 获取用户访问来源详细数据
244+
### 3.3 获取用户访问来源详细数据 (废弃不用)
243245

244246
返回用户访问统计页面下的列表数据。
245247

246248
PATH:`GET /api/v1/traffic/from/detail/`
247249

248250
参数:
249251

250-
| 名称 | 必须 | 类型 | 描述 |
252+
| 名称 | 必须 | 类型 | 描述 |
251253
| ------- | ----- | ----- | ----- |
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 | 结束时间戳 |
257259

258260
响应:
259261
```
@@ -292,8 +294,8 @@ PATH:`GET /api/v1/traffic/click/view/`
292294

293295
| 名称 | 必须 | 类型 | 描述 |
294296
| ------- | ----- | ----- | ----- |
295-
| start_time | | int | 开始时间戳 |
296-
| end_time | | int | 结束时间戳 |
297+
| start_time || int | 开始时间戳 |
298+
| end_time || int | 结束时间戳 |
297299

298300
响应:
299301
```
@@ -331,11 +333,11 @@ PATH:`GET /api/v1/traffic/click/detail/`
331333

332334
| 名称 | 必须 | 类型 | 描述 |
333335
| ------- | ----- | ----- | ----- |
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 | 结束时间戳 |
339341

340342
响应:
341343
```
@@ -381,8 +383,8 @@ PATH:`GET /api/v1/traffic/periodical/view/`
381383

382384
| 名称 | 必须 | 类型 | 描述 |
383385
| ------- | ----- | ----- | ----- |
384-
| volume_id | | int | 期刊的id,默认为最新一期 |
385-
| category_id | | int | 期刊分类的id,默认返回所有分类的数据|
386+
| volume_id || int | 期刊的id,默认为最新一期 |
387+
| category_id || int | 期刊分类的id,默认返回所有分类的数据|
386388

387389
响应:
388390
```
@@ -418,10 +420,10 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
418420

419421
| 名称 | 必须 | 类型 | 描述 |
420422
| ------- | ----- | ----- | ----- |
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为升序 |
425427

426428

427429
响应:
@@ -456,8 +458,6 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
456458
```
457459

458460

459-
460-
461461
## 四、日报汇总展示接口
462462

463463
日报汇总展示接口时间范围字段:
@@ -480,8 +480,8 @@ PATH:`GET /api/v1/daily/langs/`
480480

481481
| 名称 | 必须 | 类型 | 描述 |
482482
| ------- | ----- | ----- | ----- |
483-
| start_time || int | 开始时间戳 |
484-
| end_time | | int | 结束时间戳 |
483+
| start_time || int | 开始时间戳 |
484+
| end_time || int | 结束时间戳 |
485485

486486
响应:
487487
```
@@ -503,12 +503,12 @@ PATH:`GET /api/v1/daily/report/`
503503

504504
| 名称 | 必须 | 类型 | 描述 |
505505
| ------- | ----- | ----- | ----- |
506-
| start_time || int | 开始时间戳 |
507-
| end_time || int | 结束时间戳 |
506+
| start_time || int | 开始时间戳 |
507+
| end_time || int | 结束时间戳 |
508508
| lang || string | 语言 |
509-
| page || int | 页数默认为第一页 |
510-
| order || string | 排序列(starsforksrepo_pushed_time)|
511-
| asc || int | 默认为 0 降序,1 为升序 |
509+
| page || int | 页数默认为第一页 |
510+
| order || string | 排序列(stars,forks,repo_pushed_time)|
511+
| asc || int | 默认为 0 降序,1 为升序 |
512512

513513
**Tips:** 排序列文档中枚举第一个字段是默认的排序字段
514514

0 commit comments

Comments
 (0)