mastodon
This module allows you to send toots directly from your Dagger pipeline.Installation
dagger install github.com/levlaz/daggerverse/mastodon@250b1d6bc506b9ab68fe5cfce44ce8ed1c5763b9
Entrypoint
Return Type
Mastodon
Example
dagger -m github.com/levlaz/daggerverse/mastodon@250b1d6bc506b9ab68fe5cfce44ce8ed1c5763b9 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@250b1d6bc506b9ab68fe5cfce44ce8ed1c5763b9 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)
}