Skip to content

Commit cb7971c

Browse files
committed
exapmlesのREADMEを修正
1 parent dd44f55 commit cb7971c

File tree

6 files changed

+65
-42
lines changed

6 files changed

+65
-42
lines changed

README_for_developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $ make init
1515

1616
## `annofabapi/api.py`の生成方法
1717
`annofabapi/api.py`[AnnoFab Web APIのOpenAPI specification](https://annofab.com/docs/api/swagger.yaml)から自動生成しています。
18-
詳細は[generate/README.md](generate/README_for_generate.md)を参照してください。
18+
詳細は[generate/README.md](generate/README.md)を参照してください。
1919

2020
## テスト実行方法
2121
1. AnnoFabの認証情報を`.netrc`に記載する。

examples/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# 概要
2+
annofabapiモジュールを使ったサンプルコードです。
3+
pythonコマンドを使ってCLIとして利用できます。
4+
5+
# 使い方
6+
7+
## Pipenvを使う場合
8+
9+
```
10+
$ git clone https://github.com/kurusugawa-computer/annofab-api-python-client.git
11+
$ cd annofab-api-python-client
12+
13+
$ pipenv install
14+
$ pipenv shell
15+
$ cd examples
16+
17+
# サンプルコートを実行
18+
$ python invite_user_to_projects.py --user_id user --role owner --organization ORG
19+
```
20+
21+
## Pipenvを使わない場合
22+
23+
```
24+
$ pip install annofabapi --upgrade
25+
26+
$ git clone https://github.com/kurusugawa-computer/annofab-api-python-client.git
27+
$ cd annofab-api-python-client/examples
28+
29+
# サンプルコートを実行
30+
$ python invite_user_to_projects.py --user_id user --role owner --organization ORG
31+
```
32+
33+
## Helpの見方
34+
35+
```
36+
$ python invite_user_to_projects.py -h
37+
```
38+
39+
40+
# examplesツール
41+
42+
## invite_user_to_projects.py
43+
複数のプロジェクトに、ユーザを招待します。
44+
45+
```
46+
# ORG組織配下のすべてのプロジェクトに、user1をownerロールで割り当てる
47+
$ python invite_user_to_projects.py --user_id user1 --role owner --organization ORG
48+
49+
# prj1, prj2のプロジェクトに、user1をownerロールで割り当てる
50+
$ python invite_user_to_projects.py --user_id user1 --role owner --project_id prj1 prj2
51+
```
52+
53+
## cancel_acceptance.py
54+
受け入れ完了タスクを、受け入れ取り消しにします。
55+
56+
57+
```
58+
# prj1プロジェクトのタスクを、受け入れ取り消しにする。再度受け入れを担当させるユーザは未担当
59+
$ python cancel_acceptance.py --project_id prj1 --task_id_file file
60+
61+
# prj1プロジェクトのタスクを、受け入れ取り消しにする。再度受け入れを担当させるユーザはuser1
62+
$ python cancel_acceptance.py --project_id prj1 --task_id_file file --user_id user1
63+
```
64+

examples/cancel_acceptance.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
"""
22
受け入れ完了タスクを、受け入れ取り消しする。
3-
4-
# ORG組織配下のすべてのプロジェクトに、userをownerロールで割り当てる
5-
$ python cancel_acceptance.py --project_id --user_id user --role owner --organization ORG
6-
7-
# prj1, prj2のプロジェクトに、userをownerロールで割り当てる
8-
$ python invite_user_to_projects.py --user_id user --role owner --project_id prj1 prj2
93
"""
104

115
import argparse

examples/examples.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/invite_user_to_projects.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
"""
22
複数のプロジェクトに、ユーザを招待する。
3-
4-
# ORG組織配下のすべてのプロジェクトに、userをownerロールで割り当てる
5-
$ python invite_user_to_projects.py --user_id user --role owner --organization ORG
6-
7-
# prj1, prj2のプロジェクトに、userをownerロールで割り当てる
8-
$ python invite_user_to_projects.py --user_id user --role owner --project_id prj1 prj2
93
"""
104

115
import argparse
File renamed without changes.

0 commit comments

Comments
 (0)