Streamer
- class AzuracastPy.models.Streamer(streamer_username: str, streamer_password: str, display_name: str, comments: str, is_active: bool, enforce_schedule: bool, reactivate_at: int, art_updated_at: int, schedule_items: List[ScheduleItem], id: int, links: Links, has_custom_art: bool, art: str, _station)
Represents a streamer on a station.
- __init__(streamer_username: str, streamer_password: str, display_name: str, comments: str, is_active: bool, enforce_schedule: bool, reactivate_at: int, art_updated_at: int, schedule_items: List[ScheduleItem], id: int, links: Links, has_custom_art: bool, art: str, _station)
Initializes a
Streamerinstance for a streamer.Note
This class should not be initialized directly. Instead, obtain an instance via:
create(),__call__()orstreamers().
- delete()
Deletes the streamer from the station.
Sets all attributes of the current
Streamerobject toNone.Usage:
streamer.delete()
- edit(username: str | None = None, display_name: str | None = None, comments: str | None = None, is_active: bool | None = None, enforce_schedule: bool | None = None, schedule: List[Dict[str, Any]] | None = None)
Edits the streamer’s properties.
Updates all edited attributes of the current
Streamerobject.- Parameters:
username – (Optional) The streamer’s new username.
display_name – (Optional) The streamer’s new display_name. Default:
None.comments – (Optional) Updated internal notes or comments about the streamer. Default:
None.is_active – (Optional) Determines whether this streamer can log in and stream. Default:
None.enforce_schedule – (Optional) Determines whether this streamer will only be able to connect during their scheduled broadcast times. Default:
None.schedule –
(Optional) The new structure representing the schedule list of the streamer. This can be generated using the
generate_schedule_items()function.
Usage:
streamer.edit( username="New username", display_name="The name which is displayed" )
- schedule
An instance of
ScheduleHelper.Provides the interface for working with this streamer’s schedule.
For example, to add an item to the schedule:
item = station.streamer.generate_schedule_item( start_time="12:32", end_time="23:10", start_date="2024-09-08", end_date="2025-07-08", days=["monday", "thursday"] ) streamer.schedule.add(item)
To remove an item whose id is
1from the schedule:streamer.schedule.remove(1)
- update_password(password: str)
Updates the streamer’s password.
- Parameters:
password – The streamer’s new password.
Usage:
streamer.update_password( password="new password" )