Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2527,6 +2527,19 @@ Copy a project.
project_id = client.copy_project(project_id="YOUR_PROJECT_ID")
```

### Update Project Metadata

Update a project metadata.

```python
project_metadata_id = client.update_project_metadata(
project_id="YOUR_PROJECT_ID",
external_code_1="ExternalCode1",
external_code_2="ExternalCode2",
external_code_3=None
)
```

## Tags

### Get Tags
Expand Down
24 changes: 24 additions & 0 deletions fastlabel/__init__.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

READMEへこちらの内容追記お願いします!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!
追記しました🙏

e0a803e

Original file line number Diff line number Diff line change
Expand Up @@ -4113,6 +4113,30 @@ def copy_project(self, project_id: str) -> None:
endpoint = "projects/copy"
return self.api.post_request(endpoint, payload=payload)

def update_project_metadata(
self,
project_id: str,
external_code_1: Optional[str],
external_code_2: Optional[str],
external_code_3: Optional[str],
) -> str:
"""
Update project metadata.

project_id is an id of the project (Required).
external_code_1 is a code for external identification.
external_code_2 is a code for external identification.
external_code_3 is a code for external identification.

"""
endpoint = "projects/" + project_id + "/metadata"
payload = {
"externalCode1": external_code_1,
"externalCode2": external_code_2,
"externalCode3": external_code_3,
}
return self.api.put_request(endpoint, payload=payload)

# Tags

def get_tags(
Expand Down
Loading