Sending a message on the shoutbox¶
It is possible to send a message on the shoutbox, by:
Initalizing a client with user credentials, see Initializing the client for more information;
Getting the channel in which to send the message using
Shout.get_channel()
;Sending the message using
Channel.post()
.
An example of doing so is the following:
from __future__ import annotations
import asyncio
from planetcasio.client import Client
async def main() -> None:
async with Client(auth=("<username>", "<password>")) as client:
channel = await client.shout.get_channel("hs")
await channel.post("hello, world")
asyncio.run(main())