Skip to content

cake-contrib/Cake.Mastodon

Repository files navigation

Cake.Mastodon

A Cake AddIn that extends Cake with ability to post messages to Mastodon using Mastodon REST API.

cakebuild.net NuGet

Branch Status
Master Build status
Develop Build status

Important

1.2.0

  • References Cake 4.0.0
  • Drops support for .NET Framework
  • Supports .net 6+

Including addin

Including addin in cake script is easy.

#addin "Cake.Mastodon"

Usage

To use the addin just add it to Cake call the aliases and configure any settings you want.

#addin "Cake.Mastodon"
...
string accessToken = EnvironmentVariable("MASTODON_ACCESS_TOKEN");
// How to update the status (send a toot)
var result = MastodonSendToot("https://botsin.space", accessToken, "Merely testing three", "I1");
Information($"Success: {result.IsSuccess} Code: {result.StatusCode} Phrase: {result.ReasonPhrase} Body: {result.Body}");

Credits

Brought to you by Miha Markic and contributors.

Mastodon Follow