Skip to content
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "f97463c", "specHash": "b7abe0d", "version": "10.2.0" }
{ "engineHash": "b5860f1", "specHash": "1e0848d", "version": "10.2.0" }
5 changes: 5 additions & 0 deletions box_sdk_gen/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@

from box_sdk_gen.managers.ai_studio import AiStudioManager

from box_sdk_gen.managers.metadata_taxonomies import MetadataTaxonomiesManager

from box_sdk_gen.managers.docgen_template import DocgenTemplateManager

from box_sdk_gen.managers.docgen import DocgenManager
Expand Down Expand Up @@ -427,6 +429,9 @@ def __init__(self, auth: Authentication, *, network_session: NetworkSession = No
self.ai_studio = AiStudioManager(
auth=self.auth, network_session=self.network_session
)
self.metadata_taxonomies = MetadataTaxonomiesManager(
auth=self.auth, network_session=self.network_session
)
self.docgen_template = DocgenTemplateManager(
auth=self.auth, network_session=self.network_session
)
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/managers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@

from box_sdk_gen.managers.ai_studio import *

from box_sdk_gen.managers.metadata_taxonomies import *

from box_sdk_gen.managers.docgen_template import *

from box_sdk_gen.managers.docgen import *
Expand Down
23 changes: 22 additions & 1 deletion box_sdk_gen/managers/file_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def __init__(
self.network_session = network_session

def get_file_metadata(
self, file_id: str, *, extra_headers: Optional[Dict[str, Optional[str]]] = None
self,
file_id: str,
*,
view: Optional[str] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> Metadatas:
"""
Retrieves all metadata for a given file.
Expand All @@ -145,11 +149,18 @@ def get_file_metadata(
the `file_id` is `123`.
Example: "12345"
:type file_id: str
:param view: Taxonomy field values are returned in `API view` by default, meaning
the value is represented with a taxonomy node identifier.
To retrieve the `Hydrated view`, where taxonomy values are represented
with the full taxonomy node information, set this parameter to `hydrated`.
This is the only supported value for this parameter., defaults to None
:type view: Optional[str], optional
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
:type extra_headers: Optional[Dict[str, Optional[str]]], optional
"""
if extra_headers is None:
extra_headers = {}
query_params_map: Dict[str, str] = prepare_params({'view': to_string(view)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = self.network_session.network_client.fetch(
FetchOptions(
Expand All @@ -162,6 +173,7 @@ def get_file_metadata(
]
),
method='GET',
params=query_params_map,
headers=headers_map,
response_format=ResponseFormat.JSON,
auth=self.auth,
Expand All @@ -176,6 +188,7 @@ def get_file_metadata_by_id(
scope: GetFileMetadataByIdScope,
template_key: str,
*,
view: Optional[str] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> MetadataFull:
"""
Expand All @@ -198,11 +211,18 @@ def get_file_metadata_by_id(
:param template_key: The name of the metadata template.
Example: "properties"
:type template_key: str
:param view: Taxonomy field values are returned in `API view` by default, meaning
the value is represented with a taxonomy node identifier.
To retrieve the `Hydrated view`, where taxonomy values are represented
with the full taxonomy node information, set this parameter to `hydrated`.
This is the only supported value for this parameter., defaults to None
:type view: Optional[str], optional
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
:type extra_headers: Optional[Dict[str, Optional[str]]], optional
"""
if extra_headers is None:
extra_headers = {}
query_params_map: Dict[str, str] = prepare_params({'view': to_string(view)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = self.network_session.network_client.fetch(
FetchOptions(
Expand All @@ -218,6 +238,7 @@ def get_file_metadata_by_id(
]
),
method='GET',
params=query_params_map,
headers=headers_map,
response_format=ResponseFormat.JSON,
auth=self.auth,
Expand Down
9 changes: 9 additions & 0 deletions box_sdk_gen/managers/folder_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def get_folder_metadata(
self,
folder_id: str,
*,
view: Optional[str] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> Metadatas:
"""
Expand All @@ -154,11 +155,18 @@ def get_folder_metadata(
always represented by the ID `0`.
Example: "12345"
:type folder_id: str
:param view: Taxonomy field values are returned in `API view` by default, meaning
the value is represented with a taxonomy node identifier.
To retrieve the `Hydrated view`, where taxonomy values are represented
with the full taxonomy node information, set this parameter to `hydrated`.
This is the only supported value for this parameter., defaults to None
:type view: Optional[str], optional
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
:type extra_headers: Optional[Dict[str, Optional[str]]], optional
"""
if extra_headers is None:
extra_headers = {}
query_params_map: Dict[str, str] = prepare_params({'view': to_string(view)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = self.network_session.network_client.fetch(
FetchOptions(
Expand All @@ -171,6 +179,7 @@ def get_folder_metadata(
]
),
method='GET',
params=query_params_map,
headers=headers_map,
response_format=ResponseFormat.JSON,
auth=self.auth,
Expand Down
Loading