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
dagger -m github.com/levlaz/daggerverse/mastodon@437b0f9b34314770faa68c74b6323f434fafa8a7 call \
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
Name | Type | Default Value | Description |
---|---|---|---|
server | String ! | - | url of mastodon instance |
clientId | String ! | - | mastodon application client id |
clientSecret | Secret ! | - | mastodon application client secret |
accessToken | Secret ! | - | mastodon access token |
msg | String ! | - | toot body |
visibility | String | "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)
}