Skip to content

Commit 893b810

Browse files
committed
update
1 parent 9fad2bf commit 893b810

File tree

2 files changed

+101
-10
lines changed

2 files changed

+101
-10
lines changed

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# C extensions
6+
*.so
7+
8+
# Distribution / packaging
9+
.Python
10+
env/
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
*.egg-info/
22+
.installed.cfg
23+
*.egg
24+
25+
# PyInstaller
26+
# Usually these files are written by a python script from a template
27+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
28+
*.manifest
29+
*.spec
30+
31+
# Installer logs
32+
pip-log.txt
33+
pip-delete-this-directory.txt
34+
35+
# Unit test / coverage reports
36+
htmlcov/
37+
.tox/
38+
.coverage
39+
.cache
40+
nosetests.xml
41+
coverage.xml
42+
43+
# Translations
44+
*.mo
45+
*.pot
46+
47+
# Django stuff:
48+
*.log
49+
*.log.*
50+
51+
# Sphinx documentation
52+
docs/_build/
53+
54+
# PyBuilder
55+
target/
56+
57+
58+
# Local settings
59+
60+
# vim
61+
*.swp
62+
63+
# pycharm
64+
.idea/
65+
66+
# mac os
67+
.DS_Store
68+
69+
# db file
70+
*.db
71+
db_backup/
72+
73+
# script file

doc/api.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ PATH:`GET /api/v1/volume/`
101101

102102
比如:要请求 2019年11月16日 的数据,则 start_time 为 2019年11月16日00:00:00,end_time 为 2019年11月17日00:00:00
103103

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

108108
### 3.1 获取首页汇总展示数据
109109
该接口用于统计首页汇总展示所有图表的概括图。
@@ -170,6 +170,20 @@ PATH:`GET /api/v1/traffic/views/`
170170
"category_id": 7, #分类id
171171
"count": 30,
172172
},
173+
#公告栏点击的数据(event=notice)
174+
"notice_view": {
175+
"all_count": 300,
176+
"all_ip_count": 222,
177+
"per": "hour", #时间聚合的维度分:day和hour
178+
"data": [
179+
{
180+
"timestamp": 1573713003, #时间戳
181+
"count": 440, #某一时间段公告栏的点击数量
182+
"ip_count": 322 # IP数量
183+
},
184+
...
185+
]
186+
},
173187
...
174188
]
175189
}
@@ -435,6 +449,10 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
435449
}
436450
}
437451
```
452+
453+
454+
455+
438456
## 四、日报汇总展示接口
439457

440458
日报汇总展示接口时间范围字段:
@@ -445,9 +463,9 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
445463

446464
比如:要请求 2019年11月16日 的数据,则 start_time 为 2019年11月16日00:00:00,end_time 为 2019年11月17日00:00:00
447465

448-
**Tips:**
449-
- 时间:默认返回昨天的数据,时间戳单位为秒。如果两者时间间隔超过 30 天,以开始时间为准,结束时间为开始时间往后推 30 天。
450-
- 排序列文档中枚举第一个字段是默认的排序字段
466+
**Tips:** 默认返回昨天的数据,时间戳单位为秒。
467+
**Tips:** 如果两者时间间隔超过30天,以开始时间为准,结束时间为开始时间往后推30天。
468+
**Tips:** 排序列:文档中枚举第一个字段是默认的排序字段
451469

452470
### 4.1 获取某搜索时间段内的语言分类
453471

@@ -472,7 +490,7 @@ PATH:`GET /api/v1/daily/langs/`
472490
}
473491
```
474492

475-
### 4.2 获取GitHub上收集项目在某个时间段某种语言的详细数据
493+
### 4.2 获取 GitHub 上收集项目在某个时间段某种语言的详细数据
476494

477495
PATH:`GET /api/v1/daily/detail/`
478496

@@ -484,8 +502,8 @@ PATH:`GET /api/v1/daily/detail/`
484502
| end_time || int | 结束时间戳 |
485503
| lang || string | 语言 |
486504
| page || int | 页数默认为第一页 |
487-
| order || string | 排序列(stars,lang,repo_pushed_time)|
488-
| asc || int | 默认为0降序,1为升序 |
505+
| order || string | 排序列starslangrepo_pushed_time|
506+
| asc || int | 默认为 0 降序,1 为升序 |
489507

490508
响应:
491509
```
@@ -494,7 +512,7 @@ PATH:`GET /api/v1/daily/detail/`
494512
"payload": {
495513
"start_time": 1573713003,
496514
"end_time": 1573723003,
497-
"lang": "", #默认为空即不区分语言
515+
"lang": "", #默认为空,即不区分语言
498516
"current_page": 1, #当前页码
499517
"page_count": 10, #总页数
500518
"order": "stars",

0 commit comments

Comments
 (0)