Dagger
Search

twitter

Send Tweets from your Dagger Pipeline

Installation

dagger install github.com/levlaz/daggerverse/twitter@v0.1.0

Entrypoint

Return Type
Twitter !
Example
dagger -m github.com/levlaz/daggerverse/twitter@f455b906348e7fa9fda19ae849a7bc5e29deaa1d call \
func (m *myModule) example() *Twitter  {
	return dag.
			Twitter()
}
@function
def example() -> dag.Twitter:
	return (
		dag.twitter()
	)
@func()
example(): Twitter {
	return dag
		.twitter()
}

Types

Twitter 🔗

tweet() 🔗

Send Tweet

getting this to actually work with auth is a huge PITA, but this comment saves us:https://github.com/Significant-Gravitas/AutoGPT/issues/2194#issuecomment-1513626102

Return Type
String !
Arguments
NameTypeDefault ValueDescription
textString !-Tweet content
consumerKeySecret !-Twitter Consumer Key
consumerSecretSecret !-Twitter Consumer Secret
authTokenSecret !-Twitter API User Access Token
authSecretSecret !-Twitter API User Access Secret
bearerTokenSecret !-Twitter API Bearer Token
Example
dagger -m github.com/levlaz/daggerverse/twitter@f455b906348e7fa9fda19ae849a7bc5e29deaa1d call \
 tweet --text string --consumer-key env:MYSECRET --consumer-secret env:MYSECRET --auth-token env:MYSECRET --auth-secret env:MYSECRET --bearer-token env:MYSECRET
func (m *myModule) example(ctx context.Context, text string, consumerKey *Secret, consumerSecret *Secret, authToken *Secret, authSecret *Secret, bearerToken *Secret) string  {
	return dag.
			Twitter().
			Tweet(ctx, text, consumerKey, consumerSecret, authToken, authSecret, bearerToken)
}
@function
async def example(text: str, consumer_key: dagger.Secret, consumer_secret: dagger.Secret, auth_token: dagger.Secret, auth_secret: dagger.Secret, bearer_token: dagger.Secret) -> str:
	return await (
		dag.twitter()
		.tweet(text, consumer_key, consumer_secret, auth_token, auth_secret, bearer_token)
	)
@func()
async example(text: string, consumerKey: Secret, consumerSecret: Secret, authToken: Secret, authSecret: Secret, bearerToken: Secret): Promise<string> {
	return dag
		.twitter()
		.tweet(text, consumerKey, consumerSecret, authToken, authSecret, bearerToken)
}