File tree Expand file tree Collapse file tree 6 files changed +65
-42
lines changed Expand file tree Collapse file tree 6 files changed +65
-42
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ $ make init
15
15
16
16
## ` annofabapi/api.py ` の生成方法
17
17
` 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 ) を参照してください。
19
19
20
20
## テスト実行方法
21
21
1 . AnnoFabの認証情報を` .netrc ` に記載する。
Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change 1
1
"""
2
2
受け入れ完了タスクを、受け入れ取り消しする。
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
9
3
"""
10
4
11
5
import argparse
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
"""
2
2
複数のプロジェクトに、ユーザを招待する。
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
9
3
"""
10
4
11
5
import argparse
File renamed without changes.
You can’t perform that action at this time.
0 commit comments