Update README.md

dev_forge
Jasder 5 years ago
parent ac881d131a
commit d320ae40e9

@ -371,10 +371,10 @@ POST api/projects/migrate
```
curl -X POST \
-d "user_id=36401" \
-d "clone_addr=https://gitee.com/openeuler/A-Tune.git" \
-d "name=A-Tune" \
-d "description=my first project" \
-d "repository_name=mirror_demo" \
-d "clone_addr=https://gitea.com/mx8090alex/golden.git" \
-d "name=golden" \
-d "description=golden" \
-d "repository_name=golden" \
-d "project_category_id=1" \
-d "project_language_id=2" \
http://localhost:3000/api/projects/migrate | jq
@ -431,13 +431,22 @@ curl -X GET http://localhost:3000/api/projects/3263 | jq
-|-|-
|id |int |id |
|name |string|项目名称|
|identifier |string|项目标识|
|is_public |boolean|项目是否公开, true:公开false:私有|
|description |string|项目简介|
|repo_id |int|仓库id|
|repo_identifier|string|仓库标识|
返回值
```
{
"id": 3240,
"name": "好项目"
"name": "ni项目",
"identifier": "mirror_demo",
"is_public": true,
"description": "my first project mirror_demo",
"repo_id": 75073,
"repo_identifier": "mirror_demo"
}
```
---
@ -449,14 +458,11 @@ PUT api/projects/:id
*示例*
```
curl -X PUT \
-d "user_id=36401" \
-d "name=hnfl_demo" \
-d "description=my first project" \
-d "repository_name=hnfl_demo" \
-d "project_category_id=1" \
-d "project_language_id=2" \
-d "ignore_id=2" \
-d "license_id=1" \
http://localhost:3000/api/projects/3263 | jq
```
*请求参数说明:*
@ -495,8 +501,8 @@ POST api/projects/:id/members
*示例*
```
curl -X POST \
-d "user_id=36400" \
http://localhost:3000/api/projects/3263/members | jq
-d "user_id=36406" \
http://localhost:3000/api/projects/3297/members | jq
```
*请求参数说明:*
@ -558,7 +564,7 @@ http://localhost:3000/api/projects/3263/members/remove | jq
```
---
#### 更改项目成员角色
#### 更改项目成员角色/权限
```
PUT api/projects/:id/members/change_role
```
@ -655,6 +661,38 @@ http://localhost:3000/api/projects/3263/members | jq
```
---
#### Fork项目
```
POST /api/projects/:project_id/forks
```
*示例*
```
curl -X POST http://localhost:3000/api/projects/3297/forks | jq
```
*请求参数说明:*
|参数名|必选|类型|说明|
-|-|-|-
|project_id |是|int |项目id |
*返回参数说明:*
|参数名|类型|说明|
-|-|-
|id |int |项目id |
|identifier |string|项目标识|
返回值
```
{
"id": 3290,
"identifier": "newadm"
}
```
---
#### 获取代码目录列表
```
POST api/:login/:repo_identifier/entries
@ -731,7 +769,7 @@ GET api/:login/:repo_identifier/sub_entries
```
curl -X GET \
-d "ref=master" \
-d "filepath=test1_create_file6.rb" \
-d "filepath=test1_create_file.rb" \
http://localhost:3000/api/18816895620/mirror_demo/sub_entries | jq
```
*请求参数说明:*

Loading…
Cancel
Save