Receiving shoutbox events

It is possible to receive events on a shoutbox channel, by:

For example, if we only want to read messages:

from __future__ import annotations

import asyncio

from planetcasio.client import Client
from planetcasio.shout import MessagePosted


async def main() -> None:
    async with Client(auth=("<username>", "<password>")) as client:
        channel = await client.shout.get_channel("hs", fmt="bbcode")
        async for event in channel:
            if isinstance(event, MessagePosted):
                print(f"{event.username}: {event.content}")


asyncio.run(main())