diff --git a/src/webflow/resources/sites/client.py b/src/webflow/resources/sites/client.py index c2a4468..845898f 100644 --- a/src/webflow/resources/sites/client.py +++ b/src/webflow/resources/sites/client.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing +from typing import List from ...core.client_wrapper import SyncClientWrapper from .resources.redirects.client import RedirectsClient from .resources.plans.client import PlansClient @@ -104,11 +105,13 @@ def create( ) try: if 200 <= _response.status_code < 300: + response_json = _response.json() + sites_list = response_json.get("sites", []) return typing.cast( - Site, + List[Site], parse_obj_as( - type_=Site, # type: ignore - object_=_response.json(), + type_=List[Site], # type: ignore + object_=sites_list, ), ) if _response.status_code == 400: @@ -176,7 +179,7 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> Sites: + def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> List[Site]: """ List of all sites the provided access token is able to access.