From e179f31e3e8dcc5e2331e1df374215b4e2c9aaac Mon Sep 17 00:00:00 2001 From: faycute Date: Fri, 26 Feb 2021 18:52:43 +0900 Subject: [PATCH] update to 0.3.1 --- README.md | 6 +++--- examples/create_task.py | 4 ++-- fastlabel/__init__.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e93c93b..dbbf349 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ API is allowed to call 1000 times per 10 minutes. If you create/delete a large s - Create a new task. ```python -task = client.create_task( +task_id = client.create_task( project="YOUR_PROJECT_SLUG", name="sample.jpg", file_path="./sample.jpg" @@ -46,7 +46,7 @@ task = client.create_task( - Create a new task with pre-defined annotations. (Class should be configured on your project in advance) ```python -task = client.create_task( +task_id = client.create_task( project="YOUR_PROJECT_SLUG", name="sample.jpg", file_path="./sample.jpg", @@ -75,7 +75,7 @@ task = client.create_task( - Update a single task status, tags, and annotations. ```python -task = client.update_task( +task_id = client.update_task( task_id="YOUR_TASK_ID", status="approved", tags=["tag1", "tag2"], diff --git a/examples/create_task.py b/examples/create_task.py index 795069c..d063528 100644 --- a/examples/create_task.py +++ b/examples/create_task.py @@ -24,10 +24,10 @@ ] }] -task = client.create_task( +task_id = client.create_task( project=project, name=name, file_path=file_path, annotations=annotations ) -pprint(task) +pprint(task_id) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 66223bd..800650d 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -136,11 +136,11 @@ def get_tasks( tags: list = [], offset: int = None, limit: int = 100, - ) -> dict: + ) -> list: """ Returns a list of tasks. - Returns up to 100 at a time, to get more, set task id of the last page passed back to startAfter param. + Returns up to 1000 at a time, to get more, set offset as the starting position to fetch. project is slug of your project. (Required) status can be 'registered', 'in_progress', 'completed', 'skipped', 'in_review', 'send_backed', 'approved', 'customer_in_review', 'customer_send_backed', 'customer_approved'. (Optional) @@ -168,7 +168,7 @@ def create_task( status: str = None, annotations: list = [], tags: list = [], - ) -> dict: + ) -> str: """ Create a single task. @@ -199,7 +199,7 @@ def update_task( status: str = None, annotations: list = [], tags: list = [], - ) -> dict: + ) -> str: """ Update a single task.