coinbase_agentkit.action_providers.twitter package¶
Submodules¶
coinbase_agentkit.action_providers.twitter.schemas module¶
Schemas for Twitter action provider.
- class coinbase_agentkit.action_providers.twitter.schemas.AccountDetailsSchema(**data)¶
Bases:
BaseModel
Input argument schema for Twitter account details action.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class coinbase_agentkit.action_providers.twitter.schemas.AccountMentionsSchema(**data)¶
Bases:
BaseModel
Input argument schema for Twitter account mentions action.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
user_id:
str
¶
- class coinbase_agentkit.action_providers.twitter.schemas.PostTweetReplySchema(**data)¶
Bases:
BaseModel
Input argument schema for posting a tweet reply.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
tweet_id:
str
¶
-
tweet_reply:
str
¶
- class coinbase_agentkit.action_providers.twitter.schemas.PostTweetSchema(**data)¶
Bases:
BaseModel
Input argument schema for posting a tweet.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
tweet:
str
¶
coinbase_agentkit.action_providers.twitter.twitter_action_provider module¶
Twitter action provider.
- class coinbase_agentkit.action_providers.twitter.twitter_action_provider.TwitterActionProvider(api_key=None, api_secret=None, access_token=None, access_token_secret=None, bearer_token=None)¶
Bases:
ActionProvider
Provides actions for interacting with Twitter.
- account_details(args)¶
Get the authenticated Twitter user account details.
- Parameters:
args (dict[str, Any]) – Empty dictionary, no arguments needed.
- Returns:
A message containing the action response or error details.
- Return type:
str
- account_mentions(args)¶
Get mentions for a specified Twitter user.
- Parameters:
args (dict[str, Any]) – Arguments containing user_id to get mentions for.
- Returns:
A message containing the action response or error details.
- Return type:
str
- post_tweet(args)¶
Post a tweet on Twitter.
- Parameters:
args (dict[str, Any]) – Arguments containing tweet text to post.
- Returns:
A message containing the action response or error details.
- Return type:
str
- post_tweet_reply(args)¶
Post a reply to a tweet on Twitter.
- Parameters:
args (dict[str, Any]) – Arguments containing tweet_reply text and tweet_id to reply to.
- Returns:
A message containing the action response or error details.
- Return type:
str
- supports_network(network)¶
Check if network is supported by Twitter actions.
- Returns:
Always True as Twitter actions don’t depend on blockchain networks.
- Return type:
bool
- coinbase_agentkit.action_providers.twitter.twitter_action_provider.twitter_action_provider(api_key=None, api_secret=None, access_token=None, access_token_secret=None, bearer_token=None)¶
Create and return a new TwitterActionProvider instance.
- Return type:
Module contents¶
Twitter action provider for social interaction.