Updated to API version 0.2

This commit is contained in:
Profitroll 2023-03-23 12:44:02 +01:00
parent c88eab236b
commit dc55b70536
3 changed files with 46 additions and 10 deletions

View File

@ -15,6 +15,7 @@ def _get_kwargs(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
lat: Union[Unset, None, float] = UNSET,
@ -31,6 +32,8 @@ def _get_kwargs(
params["caption"] = caption
params["token"] = token
params["page"] = page
params["page_size"] = page_size
@ -61,6 +64,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = cast(Any, None)
return response_400
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = cast(Any, None)
return response_401
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = cast(Any, None)
return response_404
@ -88,6 +94,7 @@ def sync_detailed(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
lat: Union[Unset, None, float] = UNSET,
@ -96,12 +103,13 @@ def sync_detailed(
) -> Response[Union[Any, SearchResultsPhoto]]:
"""Photo Find
Find a photo by filename
Find a photo by filename, caption, location or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
lat (Union[Unset, None, float]):
@ -121,6 +129,7 @@ def sync_detailed(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
lat=lat,
@ -142,6 +151,7 @@ def sync(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
lat: Union[Unset, None, float] = UNSET,
@ -150,12 +160,13 @@ def sync(
) -> Optional[Union[Any, SearchResultsPhoto]]:
"""Photo Find
Find a photo by filename
Find a photo by filename, caption, location or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
lat (Union[Unset, None, float]):
@ -175,6 +186,7 @@ def sync(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
lat=lat,
@ -189,6 +201,7 @@ async def asyncio_detailed(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
lat: Union[Unset, None, float] = UNSET,
@ -197,12 +210,13 @@ async def asyncio_detailed(
) -> Response[Union[Any, SearchResultsPhoto]]:
"""Photo Find
Find a photo by filename
Find a photo by filename, caption, location or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
lat (Union[Unset, None, float]):
@ -222,6 +236,7 @@ async def asyncio_detailed(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
lat=lat,
@ -241,6 +256,7 @@ async def asyncio(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
lat: Union[Unset, None, float] = UNSET,
@ -249,12 +265,13 @@ async def asyncio(
) -> Optional[Union[Any, SearchResultsPhoto]]:
"""Photo Find
Find a photo by filename
Find a photo by filename, caption, location or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
lat (Union[Unset, None, float]):
@ -275,6 +292,7 @@ async def asyncio(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
lat=lat,

View File

@ -15,6 +15,7 @@ def _get_kwargs(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
) -> Dict[str, Any]:
@ -28,6 +29,8 @@ def _get_kwargs(
params["caption"] = caption
params["token"] = token
params["page"] = page
params["page_size"] = page_size
@ -52,6 +55,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = cast(Any, None)
return response_400
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = cast(Any, None)
return response_401
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = cast(Any, None)
return response_404
@ -79,17 +85,19 @@ def sync_detailed(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
) -> Response[Union[Any, SearchResultsVideo]]:
"""Video Find
Find a video by filename
Find a video by filename, caption or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
@ -106,6 +114,7 @@ def sync_detailed(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
)
@ -124,17 +133,19 @@ def sync(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
) -> Optional[Union[Any, SearchResultsVideo]]:
"""Video Find
Find a video by filename
Find a video by filename, caption or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
@ -151,6 +162,7 @@ def sync(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
).parsed
@ -162,17 +174,19 @@ async def asyncio_detailed(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
) -> Response[Union[Any, SearchResultsVideo]]:
"""Video Find
Find a video by filename
Find a video by filename, caption or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
@ -189,6 +203,7 @@ async def asyncio_detailed(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
)
@ -205,17 +220,19 @@ async def asyncio(
client: AuthenticatedClient,
q: Union[Unset, None, str] = UNSET,
caption: Union[Unset, None, str] = UNSET,
token: Union[Unset, None, str] = UNSET,
page: Union[Unset, None, int] = 1,
page_size: Union[Unset, None, int] = 100,
) -> Optional[Union[Any, SearchResultsVideo]]:
"""Video Find
Find a video by filename
Find a video by filename, caption or token
Args:
album (str):
q (Union[Unset, None, str]):
caption (Union[Unset, None, str]):
token (Union[Unset, None, str]):
page (Union[Unset, None, int]): Default: 1.
page_size (Union[Unset, None, int]): Default: 100.
@ -233,6 +250,7 @@ async def asyncio(
client=client,
q=q,
caption=caption,
token=token,
page=page,
page_size=page_size,
)

View File

@ -7,8 +7,8 @@ long_description = (here / "README.md").read_text(encoding="utf-8")
setup(
name="PhotosAPI_Client",
version="0.1.1",
description="A client library for accessing END PLAY Photos",
version="0.2.0",
description="A client library for accessing Photos API",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),