Skip to content

Commit 0b019c7

Browse files
committed
update api doc
1 parent de33be1 commit 0b019c7

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

doc/api.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,8 @@ PATH:`GET /api/v1/traffic/periodical/detail/`
470470

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

475-
### 4.1 获取某搜索时间段内的语言分类
474+
### 4.1 获取语言分类
476475

477476
PATH:`GET /api/v1/daily/langs/`
478477

@@ -495,7 +494,7 @@ PATH:`GET /api/v1/daily/langs/`
495494
}
496495
```
497496

498-
### 4.2 获取 GitHub 上收集项目在某个时间段某种语言的详细数据
497+
### 4.2 获取 GitHub Source 上收集项目的详细数据
499498

500499
PATH:`GET /api/v1/daily/detail/`
501500

@@ -504,11 +503,13 @@ PATH:`GET /api/v1/daily/detail/`
504503
| 名称 | 必须 | 类型 | 描述 |
505504
| ------- | ----- | ----- | ----- |
506505
| start_time || int | 开始时间戳 |
507-
| end_time || int | 结束时间戳 |
508-
| lang || string | 语言 |
509-
| page || int | 页数默认为第一页 |
510-
| order || string | 排序列(stars、lang、repo_pushed_time)|
511-
| asc || int | 默认为 0 降序,1 为升序 |
506+
| end_time || int | 结束时间戳 |
507+
| lang || string | 语言 |
508+
| page || int | 页数默认为第一页 |
509+
| order || string | 排序列(stars、forks、repo_pushed_time)|
510+
| asc || int | 默认为 0 降序,1 为升序 |
511+
512+
**Tips:** 排序列文档中枚举第一个字段是默认的排序字段
512513

513514
响应:
514515
```
@@ -517,24 +518,22 @@ PATH:`GET /api/v1/daily/detail/`
517518
"payload": {
518519
"start_time": 1573713003,
519520
"end_time": 1573723003,
520-
"lang": "", #默认为空,即不区分语言
521+
"primary_lang": "", #默认为空,即不区分语言
521522
"current_page": 1, #当前页码
522523
"page_count": 10, #总页数
523524
"order": "stars",
524525
"asc": 0,
526+
"count": 10, #本次返回项目总数
525527
"data": [
526528
{
527-
"repo_id": 13, #项目唯一id
528-
"name": "HelloGitHub", #项目名称
529-
"desc": "分享有趣的GitHub项目", #项目描述
530-
"star": 3000, #项目star数
531-
"lang": "Python", #项目主语言
532-
"url": "https://github.com/521xueweihan/HelloGitHub", #项目地址
533-
"repo_pushed_time": 1573713003,
534-
"volume_id": 1,
535-
"volume_name": "01", #月刊期数,
536-
"category_id": 7,
537-
"category_name": "Go 项目"
529+
"description": "Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.",
530+
"is_chinese": false,
531+
"name": "consul",
532+
"primary_lang": "Go",
533+
"repo_pushed_time": 1592275530, # 项目最后一次活动时间
534+
"stars": 19431,
535+
"forks": 332,
536+
"url": "https://github.com/hashicorp/consul"
538537
},
539538
...
540539
]

0 commit comments

Comments
 (0)