Skip to content

Commit 45175f3

Browse files
committed
ProjectMetadataのアップデートメソッド追加
1 parent 76d9c3d commit 45175f3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

fastlabel/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4113,6 +4113,25 @@ def copy_project(self, project_id: str) -> None:
41134113
endpoint = "projects/copy"
41144114
return self.api.post_request(endpoint, payload=payload)
41154115

4116+
def update_project_metadata(self, project_id: str, external_code_1: str | None, external_code_2: str | None, external_code_3: str | None) -> dict:
4117+
"""
4118+
Update project metadata.
4119+
4120+
project_id is an id of the project (Required).
4121+
external_code_1 is a code for external identification.
4122+
external_code_2 is a code for external identification.
4123+
external_code_3 is a code for external identification.
4124+
4125+
"""
4126+
endpoint = "projects/" + project_id + "/metadata"
4127+
payload = {
4128+
"externalCode1": external_code_1,
4129+
"externalCode2": external_code_2,
4130+
"externalCode3": external_code_3,
4131+
}
4132+
return self.api.put_request(endpoint, payload=payload)
4133+
4134+
41164135
# Tags
41174136

41184137
def get_tags(

0 commit comments

Comments
 (0)