-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,205 changed files
with
66,837 additions
and
66,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
rentman_api_client/api/appointmentcrew/appointment_crew_collection_get.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
from typing import Any, Dict, Optional | ||
|
||
import httpx | ||
|
||
from ...client import Client | ||
from ...models.appointment_crew_collectionget_response_schema import AppointmentCrewCollectiongetResponseSchema | ||
from ...types import Response | ||
|
||
|
||
def _get_kwargs( | ||
*, | ||
client: Client, | ||
) -> Dict[str, Any]: | ||
url = "{}/appointmentcrew".format(client.base_url) | ||
|
||
headers: Dict[str, Any] = client.get_headers() | ||
cookies: Dict[str, Any] = client.get_cookies() | ||
|
||
return { | ||
"url": url, | ||
"headers": headers, | ||
"cookies": cookies, | ||
"timeout": client.get_timeout(), | ||
} | ||
|
||
|
||
def _parse_response(*, response: httpx.Response) -> Optional[AppointmentCrewCollectiongetResponseSchema]: | ||
if response.status_code == 200: | ||
response_200 = AppointmentCrewCollectiongetResponseSchema.from_dict(response.json()) | ||
|
||
return response_200 | ||
return None | ||
|
||
|
||
def _build_response(*, response: httpx.Response) -> Response[AppointmentCrewCollectiongetResponseSchema]: | ||
return Response( | ||
status_code=response.status_code, | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
*, | ||
client: Client, | ||
) -> Response[AppointmentCrewCollectiongetResponseSchema]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
) | ||
|
||
response = httpx.get( | ||
**kwargs, | ||
) | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
def sync( | ||
*, | ||
client: Client, | ||
) -> Optional[AppointmentCrewCollectiongetResponseSchema]: | ||
""" """ | ||
|
||
return sync_detailed( | ||
client=client, | ||
).parsed | ||
|
||
|
||
async def asyncio_detailed( | ||
*, | ||
client: Client, | ||
) -> Response[AppointmentCrewCollectiongetResponseSchema]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
) | ||
|
||
async with httpx.AsyncClient() as _client: | ||
response = await _client.get(**kwargs) | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
async def asyncio( | ||
*, | ||
client: Client, | ||
) -> Optional[AppointmentCrewCollectiongetResponseSchema]: | ||
""" """ | ||
|
||
return ( | ||
await asyncio_detailed( | ||
client=client, | ||
) | ||
).parsed |
File renamed without changes.
103 changes: 103 additions & 0 deletions
103
rentman_api_client/api/appointmentcrew/appointment_crew_item_get.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
from typing import Any, Dict, Optional | ||
|
||
import httpx | ||
|
||
from ...client import Client | ||
from ...models.appointment_crew_itemget_response_schema import AppointmentCrewItemgetResponseSchema | ||
from ...types import Response | ||
|
||
|
||
def _get_kwargs( | ||
*, | ||
client: Client, | ||
id: int, | ||
) -> Dict[str, Any]: | ||
url = "{}/appointmentcrew/{id}".format(client.base_url, id=id) | ||
|
||
headers: Dict[str, Any] = client.get_headers() | ||
cookies: Dict[str, Any] = client.get_cookies() | ||
|
||
return { | ||
"url": url, | ||
"headers": headers, | ||
"cookies": cookies, | ||
"timeout": client.get_timeout(), | ||
} | ||
|
||
|
||
def _parse_response(*, response: httpx.Response) -> Optional[AppointmentCrewItemgetResponseSchema]: | ||
if response.status_code == 200: | ||
response_200 = AppointmentCrewItemgetResponseSchema.from_dict(response.json()) | ||
|
||
return response_200 | ||
return None | ||
|
||
|
||
def _build_response(*, response: httpx.Response) -> Response[AppointmentCrewItemgetResponseSchema]: | ||
return Response( | ||
status_code=response.status_code, | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
*, | ||
client: Client, | ||
id: int, | ||
) -> Response[AppointmentCrewItemgetResponseSchema]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
id=id, | ||
) | ||
|
||
response = httpx.get( | ||
**kwargs, | ||
) | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
def sync( | ||
*, | ||
client: Client, | ||
id: int, | ||
) -> Optional[AppointmentCrewItemgetResponseSchema]: | ||
""" """ | ||
|
||
return sync_detailed( | ||
client=client, | ||
id=id, | ||
).parsed | ||
|
||
|
||
async def asyncio_detailed( | ||
*, | ||
client: Client, | ||
id: int, | ||
) -> Response[AppointmentCrewItemgetResponseSchema]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
id=id, | ||
) | ||
|
||
async with httpx.AsyncClient() as _client: | ||
response = await _client.get(**kwargs) | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
async def asyncio( | ||
*, | ||
client: Client, | ||
id: int, | ||
) -> Optional[AppointmentCrewItemgetResponseSchema]: | ||
""" """ | ||
|
||
return ( | ||
await asyncio_detailed( | ||
client=client, | ||
id=id, | ||
) | ||
).parsed |
Oops, something went wrong.