Dagger
Search

mastodon

This module allows you to send toots directly from your Dagger pipeline.

Installation

dagger install github.com/levlaz/daggerverse/mastodon@v0.1.8

Entrypoint

Return Type
Mastodon
Example
func (m *myModule) example() *Mastodon  {
	return dag.
			Mastodon()
}
@function
def example() -> dag.Mastodon:
	return (
		dag.mastodon()
	)
@func()
example(): Mastodon {
	return dag
		.mastodon()
}

Types

Mastodon

toot()

Send toot to mastodon instance

Example usage: dagger call toot –server=“” –client-id=“” –client-secret=env:MASTODON_CLIENT_SECRET –access-token=env:MASTODON_ACCESS_TOKEN –msg=“hello from the DAG”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
serverString !-url of mastodon instance
clientIdString !-mastodon application client id
clientSecretSecret !-mastodon application client secret
accessTokenSecret !-mastodon access token
msgString !-toot body
visibilityString "public"toot visibility, one of public, unlisted, private, direct
Example
dagger -m github.com/levlaz/daggerverse/mastodon@437b0f9b34314770faa68c74b6323f434fafa8a7 call \
 toot --server string --client-id string --client-secret env:MYSECRET --access-token env:MYSECRET --msg string
func (m *myModule) example(ctx context.Context, server string, clientId string, clientSecret *Secret, accessToken *Secret, msg string) string  {
	return dag.
			Mastodon().
			Toot(ctx, server, clientId, clientSecret, accessToken, msg)
}
@function
async def example(server: str, client_id: str, client_secret: dagger.Secret, access_token: dagger.Secret, msg: str) -> str:
	return await (
		dag.mastodon()
		.toot(server, client_id, client_secret, access_token, msg)
	)
@func()
async example(server: string, clientId: string, clientSecret: Secret, accessToken: Secret, msg: string): Promise<string> {
	return dag
		.mastodon()
		.toot(server, clientId, clientSecret, accessToken, msg)
}