sounds.client¶
Attributes¶
Classes¶
A client to interact with the Sounds API |
Module Contents¶
- sounds.client.COOKIE_FILE¶
- class sounds.client.SoundsClient(username: str | None = None, password: str | None = None, session: aiohttp.ClientSession | None = None, cookie_file_location: str | pathlib.Path = COOKIE_FILE, timezone: datetime.tzinfo | None = None, logger: logging.Logger | None = None, log_level: int | None = None, mock_session: bool = False, **kwargs)¶
A client to interact with the Sounds API
- username = None¶
- password = None¶
- login_details_provided = False¶
- current_station: sounds.models.Station | None = None¶
- current_stream: sounds.models.Stream | None = None¶
- current_segment: sounds.models.Segment | None = None¶
- timeout¶
- mock_session = False¶
- managing_session¶
- cookie_store¶
- auth¶
- schedules¶
- user¶
- requests¶
- streaming¶
- stations¶
- personal¶
- setLogger(log_level=None)¶
- async login() bool¶
Signs into BBC Sounds.
- Parameters:
username – The username or email address to sign in with
password – The password to sign in with
- Returns:
True if successfully logged in, False otherwise
- Return type:
- Raises:
LoginFailedError – If the login fails for any reason
UnauthorisedError – If the login is not authorised
- save_cookies()¶
- load_cookies()¶
Get the main Sounds menu.
- async logout()¶
- async close()¶