geotribu_cli.social.mastodon_client module#

geotribu_cli.social.mastodon_client.broadcast_to_mastodon(in_comment, public=True)#

Post the latest comment to Mastodon.

Paramètres:
  • in_comment (Comment) – comment to broadcast

  • public (bool) – if not, the comment is sent as direct message, so it’s not public.

Type renvoyé:

dict

Renvoie:

URL to posted status

geotribu_cli.social.mastodon_client.comment_already_broadcasted(comment_id, media='mastodon')#

Check if comment has already been broadcasted on the media.

Paramètres:
  • comment_id (int) – id of the comment to check

  • media (str) – name of the targetted media

Type renvoyé:

dict

Renvoie:

post on media if it has been already published

geotribu_cli.social.mastodon_client.comment_to_media(in_comment, media)#

Format comment to fit media size and publication rules.

Paramètres:
  • in_comment (Comment) – comment to format

  • media (str) – name of the targetted media

Type renvoyé:

str

Renvoie:

formatted comment