Skip to content

Commit e4662ec

Browse files
committed
Update moq api
1 parent ef11da8 commit e4662ec

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

fishjam/_openapi_client/models/moq_token.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@
1111

1212
@_attrs_define
1313
class MoqToken:
14-
"""Token for authorizing a MoQ relay connection
14+
"""Connection details for a MoQ relay client
1515
1616
Attributes:
17-
token (str): JWT token for MoQ relay Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb290IjoiZmlzaGphbSIsInB1d
18-
CI6WyJteS1zdHJlYW0iXSwiZ2V0IjpbXSwiaWF0IjoxNzEzMzYwMDAwLCJleHAiOjE3MTMzNjM2MDB9.abc123.
17+
url (str): Relay connection URL with the JWT embedded as a `?jwt=` query parameter. Pass directly to a MoQ
18+
client SDK. Example: https://relay.fishjam.io/abc123?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
1919
"""
2020

21-
token: str
21+
url: str
2222
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
2323

2424
def to_dict(self) -> dict[str, Any]:
25-
token = self.token
25+
url = self.url
2626

2727
field_dict: dict[str, Any] = {}
2828
field_dict.update(self.additional_properties)
2929
field_dict.update({
30-
"token": token,
30+
"url": url,
3131
})
3232

3333
return field_dict
3434

3535
@classmethod
3636
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
3737
d = dict(src_dict)
38-
token = d.pop("token")
38+
url = d.pop("url")
3939

4040
moq_token = cls(
41-
token=token,
41+
url=url,
4242
)
4343

4444
moq_token.additional_properties = d

fishjam/api/_fishjam_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,14 @@ def create_moq_token(
420420
publish_path: str | None = None,
421421
subscribe_path: str | None = None,
422422
) -> str:
423-
"""Generates a MoQ token.
423+
"""Generates a MoQ relay connection URL.
424424
425425
Args:
426426
publish_path: Path the token grants publish access to.
427427
subscribe_path: Path the token grants subscribe access to.
428428
429429
Returns:
430-
str: The generated token.
430+
str: The relay connection URL with the JWT embedded as a ``?jwt=`` query parameter.
431431
"""
432432
config = MoqTokenConfig(
433433
publish_path=publish_path, subscribe_path=subscribe_path
@@ -437,7 +437,7 @@ def create_moq_token(
437437
self._request(moq_create_token, body=config),
438438
)
439439

440-
return response.token
440+
return response.url
441441

442442
def subscribe_peer(self, room_id: str, peer_id: str, target_peer_id: str):
443443
"""Subscribes a peer to all tracks of another peer.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fishjam-server-sdk"
3-
version = "0.28.0"
3+
version = "0.28.1"
44
description = "Python server SDK for the Fishjam"
55
authors = [{ name = "Fishjam Team", email = "contact@fishjam.io" }]
66
requires-python = ">=3.10"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)