Updated to PhotosAPI v3.0

This commit is contained in:
2023-06-22 14:38:42 +02:00
parent 19b6cb7496
commit d643fde917
28 changed files with 106 additions and 82 deletions

View File

@@ -34,6 +34,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -54,7 +55,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -123,7 +124,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Album, Any, HTTPValidationError]]
Union[Album, Any, HTTPValidationError]
"""
return sync_detailed(
@@ -186,7 +187,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Album, Any, HTTPValidationError]]
Union[Album, Any, HTTPValidationError]
"""
return (

View File

@@ -25,6 +25,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
}
@@ -40,7 +41,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -104,7 +105,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -161,7 +162,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -31,6 +31,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -47,7 +48,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -113,7 +114,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[HTTPValidationError, SearchResultsAlbum]]
Union[HTTPValidationError, SearchResultsAlbum]
"""
return sync_detailed(
@@ -170,7 +171,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[HTTPValidationError, SearchResultsAlbum]]
Union[HTTPValidationError, SearchResultsAlbum]
"""
return (

View File

@@ -38,6 +38,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -60,7 +61,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -141,7 +142,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[AlbumModified, Any, HTTPValidationError]]
Union[AlbumModified, Any, HTTPValidationError]
"""
return sync_detailed(
@@ -216,7 +217,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[AlbumModified, Any, HTTPValidationError]]
Union[AlbumModified, Any, HTTPValidationError]
"""
return (

View File

@@ -38,6 +38,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -60,7 +61,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -141,7 +142,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[AlbumModified, Any, HTTPValidationError]]
Union[AlbumModified, Any, HTTPValidationError]
"""
return sync_detailed(
@@ -216,7 +217,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[AlbumModified, Any, HTTPValidationError]]
Union[AlbumModified, Any, HTTPValidationError]
"""
return (

View File

@@ -27,6 +27,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"data": form_data.to_dict(),
}
@@ -44,7 +45,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -98,7 +99,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, Token]]
Union[Any, HTTPValidationError, Token]
"""
return sync_detailed(
@@ -145,7 +146,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, Token]]
Union[Any, HTTPValidationError, Token]
"""
return (

View File

@@ -25,6 +25,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
}
@@ -40,7 +41,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -104,7 +105,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -161,7 +162,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -52,6 +52,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -74,7 +75,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
response_422 = cast(Any, None)
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -178,7 +179,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, SearchResultsPhoto]]
Union[Any, SearchResultsPhoto]
"""
return sync_detailed(
@@ -283,7 +284,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, SearchResultsPhoto]]
Union[Any, SearchResultsPhoto]
"""
return (

View File

@@ -25,13 +25,11 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
}
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, HTTPValidationError]]:
if response.status_code == HTTPStatus.OK:
response_200 = cast(Any, response.json())
return response_200
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = cast(Any, None)
return response_404
@@ -40,7 +38,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -104,7 +102,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -161,7 +159,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -31,6 +31,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -50,7 +51,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -119,7 +120,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -182,7 +183,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -32,6 +32,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -51,7 +52,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -122,7 +123,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, PhotoPublic]]
Union[Any, HTTPValidationError, PhotoPublic]
"""
return sync_detailed(
@@ -185,7 +186,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, PhotoPublic]]
Union[Any, HTTPValidationError, PhotoPublic]
"""
return (

View File

@@ -32,6 +32,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -51,7 +52,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -122,7 +123,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, PhotoPublic]]
Union[Any, HTTPValidationError, PhotoPublic]
"""
return sync_detailed(
@@ -185,7 +186,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, PhotoPublic]]
Union[Any, HTTPValidationError, PhotoPublic]
"""
return (

View File

@@ -42,6 +42,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"files": multipart_multipart_data,
"params": params,
}
@@ -63,7 +64,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -147,7 +148,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, Photo]]
Union[Any, HTTPValidationError, Photo]
"""
return sync_detailed(
@@ -228,7 +229,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, Photo]]
Union[Any, HTTPValidationError, Photo]
"""
return (

View File

@@ -31,6 +31,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -47,7 +48,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -112,7 +113,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -171,7 +172,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -31,6 +31,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -47,7 +48,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -112,7 +113,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -171,7 +172,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -26,6 +26,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"data": form_data.to_dict(),
}
@@ -42,7 +43,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -96,7 +97,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -143,7 +144,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -26,6 +26,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"data": form_data.to_dict(),
}
@@ -42,7 +43,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -96,7 +97,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -143,7 +144,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -24,6 +24,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
}
@@ -33,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Use
return response_200
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -84,7 +85,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[User]
User
"""
return sync_detailed(
@@ -127,7 +128,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[User]
User
"""
return (

View File

@@ -25,6 +25,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
}
@@ -40,7 +41,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -104,7 +105,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -161,7 +162,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -43,6 +43,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -65,7 +66,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
response_422 = cast(Any, None)
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -154,7 +155,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, SearchResultsVideo]]
Union[Any, SearchResultsVideo]
"""
return sync_detailed(
@@ -241,7 +242,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, SearchResultsVideo]]
Union[Any, SearchResultsVideo]
"""
return (

View File

@@ -25,13 +25,11 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
}
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, HTTPValidationError]]:
if response.status_code == HTTPStatus.OK:
response_200 = cast(Any, response.json())
return response_200
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = cast(Any, None)
return response_404
@@ -40,7 +38,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -104,7 +102,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return sync_detailed(
@@ -161,7 +159,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError]]
Union[Any, HTTPValidationError]
"""
return (

View File

@@ -32,6 +32,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -51,7 +52,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -122,7 +123,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, VideoPublic]]
Union[Any, HTTPValidationError, VideoPublic]
"""
return sync_detailed(
@@ -185,7 +186,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, VideoPublic]]
Union[Any, HTTPValidationError, VideoPublic]
"""
return (

View File

@@ -32,6 +32,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"params": params,
}
@@ -51,7 +52,7 @@ def _parse_response(
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -122,7 +123,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, VideoPublic]]
Union[Any, HTTPValidationError, VideoPublic]
"""
return sync_detailed(
@@ -185,7 +186,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, VideoPublic]]
Union[Any, HTTPValidationError, VideoPublic]
"""
return (

View File

@@ -36,6 +36,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"follow_redirects": client.follow_redirects,
"files": multipart_multipart_data,
"params": params,
}
@@ -54,7 +55,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
return response_422
if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None
@@ -128,7 +129,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, Video]]
Union[Any, HTTPValidationError, Video]
"""
return sync_detailed(
@@ -197,7 +198,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.
Returns:
Response[Union[Any, HTTPValidationError, Video]]
Union[Any, HTTPValidationError, Video]
"""
return (