新增:添加全部或者移除全部团队项目[文档]

This commit is contained in:
yystopf 2022-08-30 10:34:37 +08:00
parent 0f41cabe71
commit 60b3c7925d
2 changed files with 182 additions and 1 deletions

View File

@ -1 +1,78 @@
# Teams # Teams
## 团队下新增所有的项目
团队下新增所有的项目
> 示例:
```shell
curl -X POST \
http://localhost:3000/api/organizations/ceshi_org/teams/28/team_projects/create_all
```
```javascript
await octokit.request('POST /api/organizations/ceshi_org/teams/28/team_projects/create_all.json')
```
### HTTP 请求
`POST /api/organizations/:organization/teams/:id/team_projects/create_all.json`
### 请求参数:
参数 | 必选 | 默认 | 类型 | 字段说明
--------- | ------- | ------- | -------- | ----------
|organization |是| | string |组织标识 |
|id |是| | integer|团队 ID|
### 返回字段说明:
> 返回的JSON示例:
```json
{
"status": 0,
"message": "success"
}
```
<aside class="success">
Success Data.
</aside>
## 团队下删除所有的项目
团队下删除所有的项目
> 示例:
```shell
curl -X DELETE \
http://localhost:3000/api/organizations/ceshi_org/teams/28/team_projects/destroy_all
```
```javascript
await octokit.request('DELETE /api/organizations/ceshi_org/teams/28/team_projects/destroy_all.json')
```
### HTTP 请求
`DELETE /api/organizations/:organization/teams/:id/team_projects/destroy_all.json`
### 请求参数:
参数 | 必选 | 默认 | 类型 | 字段说明
--------- | ------- | ------- | -------- | ----------
|organization |是| | string |组织标识 |
|id |是| | integer|团队 ID|
### 返回字段说明:
> 返回的JSON示例:
```json
{
"status": 0,
"message": "success"
}
```
<aside class="success">
Success Data.
</aside>

View File

@ -646,6 +646,14 @@
</li> </li>
<li> <li>
<a href="#teams" class="toc-h1 toc-link" data-title="Teams">Teams</a> <a href="#teams" class="toc-h1 toc-link" data-title="Teams">Teams</a>
<ul class="toc-list-h2">
<li>
<a href="#9a2bb9044d" class="toc-h2 toc-link" data-title="团队下新增所有的项目">团队下新增所有的项目</a>
</li>
<li>
<a href="#037098e244" class="toc-h2 toc-link" data-title="团队下删除所有的项目">团队下删除所有的项目</a>
</li>
</ul>
</li> </li>
<li> <li>
<a href="#errors" class="toc-h1 toc-link" data-title="Errors">Errors</a> <a href="#errors" class="toc-h1 toc-link" data-title="Errors">Errors</a>
@ -15446,7 +15454,103 @@ http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/journals/200.json
<aside class="success"> <aside class="success">
Success Data. Success Data.
</aside> </aside>
<h1 id='issues'>Issues</h1><h1 id='organizations'>Organizations</h1><h1 id='teams'>Teams</h1><h1 id='errors'>Errors</h1> <h1 id='issues'>Issues</h1><h1 id='organizations'>Organizations</h1><h1 id='teams'>Teams</h1><h2 id='9a2bb9044d'>团队下新增所有的项目</h2>
<p>团队下新增所有的项目</p>
<blockquote>
<p>示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> POST <span class="se">\</span>
http://localhost:3000/api/organizations/ceshi_org/teams/28/team_projects/create_all
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">POST /api/organizations/ceshi_org/teams/28/team_projects/create_all.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http'>HTTP 请求</h3>
<p><code>POST /api/organizations/:organization/teams/:id/team_projects/create_all.json</code></p>
<h3 id='2eb6f47757'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
<th>必选</th>
<th>默认</th>
<th>类型</th>
<th>字段说明</th>
</tr>
</thead><tbody>
<tr>
<td>organization</td>
<td></td>
<td></td>
<td>string</td>
<td>组织标识</td>
</tr>
<tr>
<td>id</td>
<td></td>
<td></td>
<td>integer</td>
<td>团队 ID</td>
</tr>
</tbody></table>
<h3 id='7447e4874e'>返回字段说明:</h3>
<blockquote>
<p>返回的JSON示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="nl">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"success"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div>
<aside class="success">
Success Data.
</aside>
<h2 id='037098e244'>团队下删除所有的项目</h2>
<p>团队下删除所有的项目</p>
<blockquote>
<p>示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl <span class="nt">-X</span> DELETE <span class="se">\</span>
http://localhost:3000/api/organizations/ceshi_org/teams/28/team_projects/destroy_all
</code></pre></div><div class="highlight"><pre class="highlight javascript tab-javascript"><code><span class="k">await</span> <span class="nx">octokit</span><span class="p">.</span><span class="nx">request</span><span class="p">(</span><span class="dl">'</span><span class="s1">DELETE /api/organizations/ceshi_org/teams/28/team_projects/destroy_all.json</span><span class="dl">'</span><span class="p">)</span>
</code></pre></div><h3 id='http-2'>HTTP 请求</h3>
<p><code>DELETE /api/organizations/:organization/teams/:id/team_projects/destroy_all.json</code></p>
<h3 id='2eb6f47757-2'>请求参数:</h3>
<table><thead>
<tr>
<th>参数</th>
<th>必选</th>
<th>默认</th>
<th>类型</th>
<th>字段说明</th>
</tr>
</thead><tbody>
<tr>
<td>organization</td>
<td></td>
<td></td>
<td>string</td>
<td>组织标识</td>
</tr>
<tr>
<td>id</td>
<td></td>
<td></td>
<td>integer</td>
<td>团队 ID</td>
</tr>
</tbody></table>
<h3 id='7447e4874e-2'>返回字段说明:</h3>
<blockquote>
<p>返回的JSON示例:</p>
</blockquote>
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="nl">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"success"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div>
<aside class="success">
Success Data.
</aside>
<h1 id='errors'>Errors</h1>
<aside class="notice"> <aside class="notice">
This error section is stored in a separate file in <code>includes/_errors.md</code>. Slate allows you to optionally separate out your docs into many files...just save them to the <code>includes</code> folder and add them to the top of your <code>index.md</code>'s frontmatter. Files are included in the order listed. This error section is stored in a separate file in <code>includes/_errors.md</code>. Slate allows you to optionally separate out your docs into many files...just save them to the <code>includes</code> folder and add them to the top of your <code>index.md</code>'s frontmatter. Files are included in the order listed.
</aside> </aside>