Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mastodon.utils Namespace Reference

Functions

str construct_mastodon_username (dict[str, str]|None instance, dict[str, str]|None account)
 
Mastodon create_mastodon_client (str base_url, str client_id, str client_secret, str access_token)
 

Detailed Description

Mastodon util functions.

Function Documentation

◆ construct_mastodon_username()

str homeassistant.components.mastodon.utils.construct_mastodon_username ( dict[str, str] | None  instance,
dict[str, str] | None   account 
)
Construct a mastodon username from the account and instance.

Definition at line 22 of file utils.py.

◆ create_mastodon_client()

Mastodon homeassistant.components.mastodon.utils.create_mastodon_client ( str  base_url,
str  client_id,
str  client_secret,
str   access_token 
)
Create a Mastodon client with the api base url.

Definition at line 10 of file utils.py.