Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions fishjam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
FishjamClient,
Peer,
PeerOptions,
PeerOptionsVapi,
Room,
RoomOptions,
)
Expand All @@ -32,6 +33,7 @@
"receive_binary",
"PeerMetadata",
"PeerOptions",
"PeerOptionsVapi",
"RoomOptions",
"AgentOptions",
"AgentOutputOptions",
Expand Down
4 changes: 4 additions & 0 deletions fishjam/_openapi_client/api/room/add_peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())

return response_401
if response.status_code == 402:
response_402 = Error.from_dict(response.json())

return response_402
Comment thread
roznawsk marked this conversation as resolved.
if response.status_code == 404:
response_404 = Error.from_dict(response.json())

Expand Down
4 changes: 4 additions & 0 deletions fishjam/_openapi_client/api/room/create_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def _parse_response(
response_401 = Error.from_dict(response.json())

return response_401
if response.status_code == 402:
response_402 = Error.from_dict(response.json())

return response_402
Comment thread
roznawsk marked this conversation as resolved.
if response.status_code == 503:
response_503 = Error.from_dict(response.json())

Expand Down
24 changes: 12 additions & 12 deletions fishjam/_openapi_client/api/stream/create_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error import Error
from ...models.stream import Stream
from ...models.stream_config import StreamConfig
from ...models.stream_details_response import StreamDetailsResponse
from ...types import Response


Expand All @@ -32,9 +32,9 @@ def _get_kwargs(

def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Error, Stream]]:
) -> Optional[Union[Error, StreamDetailsResponse]]:
if response.status_code == 201:
response_201 = Stream.from_dict(response.json())
response_201 = StreamDetailsResponse.from_dict(response.json())

return response_201
if response.status_code == 400:
Expand All @@ -57,7 +57,7 @@ def _parse_response(

def _build_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Response[Union[Error, Stream]]:
) -> Response[Union[Error, StreamDetailsResponse]]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -70,7 +70,7 @@ def sync_detailed(
*,
client: AuthenticatedClient,
body: StreamConfig,
) -> Response[Union[Error, Stream]]:
) -> Response[Union[Error, StreamDetailsResponse]]:
"""Creates stream

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

Returns:
Response[Union[Error, Stream]]
Response[Union[Error, StreamDetailsResponse]]
"""

kwargs = _get_kwargs(
Expand All @@ -99,7 +99,7 @@ def sync(
*,
client: AuthenticatedClient,
body: StreamConfig,
) -> Optional[Union[Error, Stream]]:
) -> Optional[Union[Error, StreamDetailsResponse]]:
"""Creates stream

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

Returns:
Union[Error, Stream]
Union[Error, StreamDetailsResponse]
"""

return sync_detailed(
Expand All @@ -123,7 +123,7 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
body: StreamConfig,
) -> Response[Union[Error, Stream]]:
) -> Response[Union[Error, StreamDetailsResponse]]:
"""Creates stream

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

Returns:
Response[Union[Error, Stream]]
Response[Union[Error, StreamDetailsResponse]]
"""

kwargs = _get_kwargs(
Expand All @@ -150,7 +150,7 @@ async def asyncio(
*,
client: AuthenticatedClient,
body: StreamConfig,
) -> Optional[Union[Error, Stream]]:
) -> Optional[Union[Error, StreamDetailsResponse]]:
"""Creates stream

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

Returns:
Union[Error, Stream]
Union[Error, StreamDetailsResponse]
"""

return (
Expand Down
24 changes: 12 additions & 12 deletions fishjam/_openapi_client/api/stream/get_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error import Error
from ...models.stream import Stream
from ...models.stream_details_response import StreamDetailsResponse
from ...types import Response


Expand All @@ -25,9 +25,9 @@ def _get_kwargs(

def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Error, Stream]]:
) -> Optional[Union[Error, StreamDetailsResponse]]:
if response.status_code == 200:
response_200 = Stream.from_dict(response.json())
response_200 = StreamDetailsResponse.from_dict(response.json())

return response_200
if response.status_code == 401:
Expand All @@ -50,7 +50,7 @@ def _parse_response(

def _build_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Response[Union[Error, Stream]]:
) -> Response[Union[Error, StreamDetailsResponse]]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -63,7 +63,7 @@ def sync_detailed(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Response[Union[Error, Stream]]:
) -> Response[Union[Error, StreamDetailsResponse]]:
"""Shows information about the stream

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

Returns:
Response[Union[Error, Stream]]
Response[Union[Error, StreamDetailsResponse]]
"""

kwargs = _get_kwargs(
Expand All @@ -92,7 +92,7 @@ def sync(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, Stream]]:
) -> Optional[Union[Error, StreamDetailsResponse]]:
"""Shows information about the stream

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

Returns:
Union[Error, Stream]
Union[Error, StreamDetailsResponse]
"""

return sync_detailed(
Expand All @@ -116,7 +116,7 @@ async def asyncio_detailed(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Response[Union[Error, Stream]]:
) -> Response[Union[Error, StreamDetailsResponse]]:
"""Shows information about the stream

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

Returns:
Response[Union[Error, Stream]]
Response[Union[Error, StreamDetailsResponse]]
"""

kwargs = _get_kwargs(
Expand All @@ -143,7 +143,7 @@ async def asyncio(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, Stream]]:
) -> Optional[Union[Error, StreamDetailsResponse]]:
"""Shows information about the stream

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

Returns:
Union[Error, Stream]
Union[Error, StreamDetailsResponse]
"""

return (
Expand Down
24 changes: 12 additions & 12 deletions fishjam/_openapi_client/api/streamer/create_streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error import Error
from ...models.streamer import Streamer
from ...models.streamer_details_response import StreamerDetailsResponse
from ...types import Response


Expand All @@ -25,9 +25,9 @@ def _get_kwargs(

def _parse_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Optional[Union[Error, Streamer]]:
) -> Optional[Union[Error, StreamerDetailsResponse]]:
if response.status_code == 201:
response_201 = Streamer.from_dict(response.json())
response_201 = StreamerDetailsResponse.from_dict(response.json())

return response_201
if response.status_code == 401:
Expand All @@ -50,7 +50,7 @@ def _parse_response(

def _build_response(
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
) -> Response[Union[Error, Streamer]]:
) -> Response[Union[Error, StreamerDetailsResponse]]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -63,7 +63,7 @@ def sync_detailed(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Response[Union[Error, Streamer]]:
) -> Response[Union[Error, StreamerDetailsResponse]]:
"""Creates streamer

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

Returns:
Response[Union[Error, Streamer]]
Response[Union[Error, StreamerDetailsResponse]]
"""

kwargs = _get_kwargs(
Expand All @@ -92,7 +92,7 @@ def sync(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, Streamer]]:
) -> Optional[Union[Error, StreamerDetailsResponse]]:
"""Creates streamer

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

Returns:
Union[Error, Streamer]
Union[Error, StreamerDetailsResponse]
"""

return sync_detailed(
Expand All @@ -116,7 +116,7 @@ async def asyncio_detailed(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Response[Union[Error, Streamer]]:
) -> Response[Union[Error, StreamerDetailsResponse]]:
"""Creates streamer

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

Returns:
Response[Union[Error, Streamer]]
Response[Union[Error, StreamerDetailsResponse]]
"""

kwargs = _get_kwargs(
Expand All @@ -143,7 +143,7 @@ async def asyncio(
stream_id: str,
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, Streamer]]:
) -> Optional[Union[Error, StreamerDetailsResponse]]:
"""Creates streamer

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

Returns:
Union[Error, Streamer]
Union[Error, StreamerDetailsResponse]
"""

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