freetube.channels

This commit is contained in:
Marc Beninca 2024-09-23 14:24:58 +02:00
parent 45df475195
commit 2a01ef0066
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -0,0 +1,29 @@
"""FreeTube channels."""
from rwx import Class
class Channel(Class):
"""FreeTube channel."""
def __init__(self, uid: str, name: str) -> None:
"""Set uid & name.
:param uid: unique identifier
:type uid: str
:param name: label
:type name: str
"""
self.id = uid
self.name = name
def to_db(self) -> str:
"""Return identifier as db.
:rtype: str
"""
return f"""\
{{\
"id":"{self.id}"\
}}\
"""