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
14 changes: 6 additions & 8 deletions examples/selective_subscription/selective_subscription/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ async def create_peer(request: Request) -> Response:

peer, token = room_service.create_peer()

return JSONResponse(
{
"peer_id": peer.id,
"token": token,
"room_name": room_name,
"peer_name": peer_name,
}
)
return JSONResponse({
"peer_id": peer.id,
"token": token,
"room_name": room_name,
"peer_name": peer_name,
})
except Exception as e:
return JSONResponse({"error": str(e)}, status_code=500)

Expand Down
4 changes: 1 addition & 3 deletions fishjam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
.. include:: ../README.md
"""
""".. include:: ../README.md"""

# pylint: disable=locally-disabled, no-name-in-module, import-error

Expand Down
3 changes: 2 additions & 1 deletion fishjam/_openapi_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" A client library for accessing Fishjam Media Server """
"""A client library for accessing Fishjam Media Server"""

from .client import AuthenticatedClient, Client

__all__ = (
Expand Down
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Contains methods for accessing the API """
"""Contains methods for accessing the API"""
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/api/room/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Contains endpoint functions for accessing the API """
"""Contains endpoint functions for accessing the API"""
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/api/stream/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Contains endpoint functions for accessing the API """
"""Contains endpoint functions for accessing the API"""
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/api/streamer/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Contains endpoint functions for accessing the API """
"""Contains endpoint functions for accessing the API"""
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/api/viewer/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Contains endpoint functions for accessing the API """
"""Contains endpoint functions for accessing the API"""
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Contains shared errors types that can be raised from API functions """
"""Contains shared errors types that can be raised from API functions"""


class UnexpectedStatus(Exception):
Expand Down
2 changes: 1 addition & 1 deletion fishjam/_openapi_client/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Contains all the data models used in inputs/outputs """
"""Contains all the data models used in inputs/outputs"""

from .add_peer_body import AddPeerBody
from .error import Error
Expand Down
10 changes: 4 additions & 6 deletions fishjam/_openapi_client/models/add_peer_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"options": options,
"type": type_,
}
)
field_dict.update({
"options": options,
"type": type_,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"errors": errors,
}
)
field_dict.update({
"errors": errors,
})

return field_dict

Expand Down
20 changes: 9 additions & 11 deletions fishjam/_openapi_client/models/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,15 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"id": id,
"metadata": metadata,
"status": status,
"subscribeMode": subscribe_mode,
"subscriptions": subscriptions,
"tracks": tracks,
"type": type_,
}
)
field_dict.update({
"id": id,
"metadata": metadata,
"status": status,
"subscribeMode": subscribe_mode,
"subscriptions": subscriptions,
"tracks": tracks,
"type": type_,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/peer_details_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"data": data,
}
)
field_dict.update({
"data": data,
})

return field_dict

Expand Down
10 changes: 4 additions & 6 deletions fishjam/_openapi_client/models/peer_details_response_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"peer": peer,
"token": token,
}
)
field_dict.update({
"peer": peer,
"token": token,
})
if peer_websocket_url is not UNSET:
field_dict["peer_websocket_url"] = peer_websocket_url

Expand Down
6 changes: 3 additions & 3 deletions fishjam/_openapi_client/models/peer_options_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class PeerOptionsAgent:
"""

output: Union[Unset, "PeerOptionsAgentOutput"] = UNSET
subscribe_mode: Union[
Unset, PeerOptionsAgentSubscribeMode
] = PeerOptionsAgentSubscribeMode.AUTO
subscribe_mode: Union[Unset, PeerOptionsAgentSubscribeMode] = (
PeerOptionsAgentSubscribeMode.AUTO
)
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand Down
12 changes: 6 additions & 6 deletions fishjam/_openapi_client/models/peer_options_agent_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class PeerOptionsAgentOutput:
Default: PeerOptionsAgentOutputAudioSampleRate.VALUE_16000. Example: 16000.
"""

audio_format: Union[
Unset, PeerOptionsAgentOutputAudioFormat
] = PeerOptionsAgentOutputAudioFormat.PCM16
audio_sample_rate: Union[
Unset, PeerOptionsAgentOutputAudioSampleRate
] = PeerOptionsAgentOutputAudioSampleRate.VALUE_16000
audio_format: Union[Unset, PeerOptionsAgentOutputAudioFormat] = (
PeerOptionsAgentOutputAudioFormat.PCM16
)
audio_sample_rate: Union[Unset, PeerOptionsAgentOutputAudioSampleRate] = (
PeerOptionsAgentOutputAudioSampleRate.VALUE_16000
)
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand Down
6 changes: 3 additions & 3 deletions fishjam/_openapi_client/models/peer_options_web_rtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class PeerOptionsWebRTC:

enable_simulcast: Union[Unset, bool] = True
metadata: Union[Unset, "PeerOptionsWebRTCMetadata"] = UNSET
subscribe_mode: Union[
Unset, PeerOptionsWebRTCSubscribeMode
] = PeerOptionsWebRTCSubscribeMode.AUTO
subscribe_mode: Union[Unset, PeerOptionsWebRTCSubscribeMode] = (
PeerOptionsWebRTCSubscribeMode.AUTO
)
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/peer_refresh_token_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"data": data,
}
)
field_dict.update({
"data": data,
})

return field_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"token": token,
}
)
field_dict.update({
"token": token,
})

return field_dict

Expand Down
12 changes: 5 additions & 7 deletions fishjam/_openapi_client/models/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"config": config,
"id": id,
"peers": peers,
}
)
field_dict.update({
"config": config,
"id": id,
"peers": peers,
})

return field_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"data": data,
}
)
field_dict.update({
"data": data,
})

return field_dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"fishjam_address": fishjam_address,
"room": room,
}
)
field_dict.update({
"fishjam_address": fishjam_address,
"room": room,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/room_details_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"data": data,
}
)
field_dict.update({
"data": data,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/rooms_listing_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"data": data,
}
)
field_dict.update({
"data": data,
})

return field_dict

Expand Down
16 changes: 7 additions & 9 deletions fishjam/_openapi_client/models/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"connectedViewers": connected_viewers,
"id": id,
"public": public,
"streamers": streamers,
"viewers": viewers,
}
)
field_dict.update({
"connectedViewers": connected_viewers,
"id": id,
"public": public,
"streamers": streamers,
"viewers": viewers,
})
if audio_only is not UNSET:
field_dict["audioOnly"] = audio_only

Expand Down
12 changes: 5 additions & 7 deletions fishjam/_openapi_client/models/streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"id": id,
"status": status,
"token": token,
}
)
field_dict.update({
"id": id,
"status": status,
"token": token,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/streamer_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"token": token,
}
)
field_dict.update({
"token": token,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/streams_listing_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"data": data,
}
)
field_dict.update({
"data": data,
})

return field_dict

Expand Down
8 changes: 3 additions & 5 deletions fishjam/_openapi_client/models/subscribe_tracks_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"track_ids": track_ids,
}
)
field_dict.update({
"track_ids": track_ids,
})

return field_dict

Expand Down
Loading