Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/infuse_iot/api_client/api/board/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Contains endpoint functions for accessing the API"""
8 changes: 4 additions & 4 deletions src/infuse_iot/api_client/api/board/create_board.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from http import HTTPStatus
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Optional, Union, cast

import httpx

Expand All @@ -13,10 +13,10 @@
def _get_kwargs(
*,
body: NewBoard,
) -> Dict[str, Any]:
headers: Dict[str, Any] = {}
) -> dict[str, Any]:
headers: dict[str, Any] = {}

_kwargs: Dict[str, Any] = {
_kwargs: dict[str, Any] = {
"method": "post",
"url": "/board",
}
Expand Down
6 changes: 3 additions & 3 deletions src/infuse_iot/api_client/api/board/get_board_by_id.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from http import HTTPStatus
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Optional, Union, cast
from uuid import UUID

import httpx
Expand All @@ -12,8 +12,8 @@

def _get_kwargs(
id: UUID,
) -> Dict[str, Any]:
_kwargs: Dict[str, Any] = {
) -> dict[str, Any]:
_kwargs: dict[str, Any] = {
"method": "get",
"url": f"/board/id/{id}",
}
Expand Down
28 changes: 14 additions & 14 deletions src/infuse_iot/api_client/api/board/get_boards.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Union
from typing import Any, Optional, Union
from uuid import UUID

import httpx
Expand All @@ -13,15 +13,15 @@
def _get_kwargs(
*,
organisation_id: UUID,
) -> Dict[str, Any]:
params: Dict[str, Any] = {}
) -> dict[str, Any]:
params: dict[str, Any] = {}

json_organisation_id = str(organisation_id)
params["organisationId"] = json_organisation_id

params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

_kwargs: Dict[str, Any] = {
_kwargs: dict[str, Any] = {
"method": "get",
"url": "/board",
"params": params,
Expand All @@ -30,7 +30,7 @@ def _get_kwargs(
return _kwargs


def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List["Board"]]:
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[list["Board"]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
Expand All @@ -46,7 +46,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
return None


def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List["Board"]]:
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[list["Board"]]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -59,7 +59,7 @@ def sync_detailed(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: UUID,
) -> Response[List["Board"]]:
) -> Response[list["Board"]]:
"""Get all boards in an organisation

Args:
Expand All @@ -70,7 +70,7 @@ def sync_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[List['Board']]
Response[list['Board']]
"""

kwargs = _get_kwargs(
Expand All @@ -88,7 +88,7 @@ def sync(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: UUID,
) -> Optional[List["Board"]]:
) -> Optional[list["Board"]]:
"""Get all boards in an organisation

Args:
Expand All @@ -99,7 +99,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
List['Board']
list['Board']
"""

return sync_detailed(
Expand All @@ -112,7 +112,7 @@ async def asyncio_detailed(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: UUID,
) -> Response[List["Board"]]:
) -> Response[list["Board"]]:
"""Get all boards in an organisation

Args:
Expand All @@ -123,7 +123,7 @@ async def asyncio_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[List['Board']]
Response[list['Board']]
"""

kwargs = _get_kwargs(
Expand All @@ -139,7 +139,7 @@ async def asyncio(
*,
client: Union[AuthenticatedClient, Client],
organisation_id: UUID,
) -> Optional[List["Board"]]:
) -> Optional[list["Board"]]:
"""Get all boards in an organisation

Args:
Expand All @@ -150,7 +150,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
List['Board']
list['Board']
"""

return (
Expand Down
28 changes: 14 additions & 14 deletions src/infuse_iot/api_client/api/board/get_devices_by_board_id.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Union, cast
from typing import Any, Optional, Union, cast
from uuid import UUID

import httpx
Expand All @@ -15,16 +15,16 @@ def _get_kwargs(
*,
metadata_name: Union[Unset, str] = UNSET,
metadata_value: Union[Unset, str] = UNSET,
) -> Dict[str, Any]:
params: Dict[str, Any] = {}
) -> dict[str, Any]:
params: dict[str, Any] = {}

params["metadataName"] = metadata_name

params["metadataValue"] = metadata_value

params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

_kwargs: Dict[str, Any] = {
_kwargs: dict[str, Any] = {
"method": "get",
"url": f"/board/id/{id}/devices",
"params": params,
Expand All @@ -35,7 +35,7 @@ def _get_kwargs(

def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Any, List["Device"]]]:
) -> Optional[Union[Any, list["Device"]]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
Expand All @@ -56,7 +56,7 @@ def _parse_response(

def _build_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Response[Union[Any, List["Device"]]]:
) -> Response[Union[Any, list["Device"]]]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -71,7 +71,7 @@ def sync_detailed(
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
metadata_value: Union[Unset, str] = UNSET,
) -> Response[Union[Any, List["Device"]]]:
) -> Response[Union[Any, list["Device"]]]:
"""Get devices by board id and optional metadata field

Args:
Expand All @@ -84,7 +84,7 @@ def sync_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Union[Any, List['Device']]]
Response[Union[Any, list['Device']]]
"""

kwargs = _get_kwargs(
Expand All @@ -106,7 +106,7 @@ def sync(
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
metadata_value: Union[Unset, str] = UNSET,
) -> Optional[Union[Any, List["Device"]]]:
) -> Optional[Union[Any, list["Device"]]]:
"""Get devices by board id and optional metadata field

Args:
Expand All @@ -119,7 +119,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Union[Any, List['Device']]
Union[Any, list['Device']]
"""

return sync_detailed(
Expand All @@ -136,7 +136,7 @@ async def asyncio_detailed(
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
metadata_value: Union[Unset, str] = UNSET,
) -> Response[Union[Any, List["Device"]]]:
) -> Response[Union[Any, list["Device"]]]:
"""Get devices by board id and optional metadata field

Args:
Expand All @@ -149,7 +149,7 @@ async def asyncio_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Union[Any, List['Device']]]
Response[Union[Any, list['Device']]]
"""

kwargs = _get_kwargs(
Expand All @@ -169,7 +169,7 @@ async def asyncio(
client: Union[AuthenticatedClient, Client],
metadata_name: Union[Unset, str] = UNSET,
metadata_value: Union[Unset, str] = UNSET,
) -> Optional[Union[Any, List["Device"]]]:
) -> Optional[Union[Any, list["Device"]]]:
"""Get devices by board id and optional metadata field

Args:
Expand All @@ -182,7 +182,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Union[Any, List['Device']]
Union[Any, list['Device']]
"""

return (
Expand Down
1 change: 1 addition & 0 deletions src/infuse_iot/api_client/api/coap/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Contains endpoint functions for accessing the API"""
Loading