Modules@robinpath/twitter
@robinpath/twitter
0.1.0PublicTwitter/X module for RobinPath.
@robinpath/twitter
Twitter/X module for RobinPath.
Why use this module?
The twitter module lets you:
- Create a new tweet
- Delete a tweet by ID
- Get a single tweet by ID with optional expansions and fields
- Get multiple tweets by IDs
- Get tweets from a user's timeline
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/twitter
Quick Start
1. Set up credentials
twitter.setToken "AAAA...your-bearer-token"
2. Create a new tweet
twitter.createTweet "Hello from RobinPath!"
Available Functions
| Function | Description |
|---|---|
twitter.setToken | Store a Bearer token for X/Twitter API v2 authentication |
twitter.createTweet | Create a new tweet |
twitter.deleteTweet | Delete a tweet by ID |
twitter.getTweet | Get a single tweet by ID with optional expansions and fields |
twitter.getTweets | Get multiple tweets by IDs |
twitter.getUserTimeline | Get tweets from a user's timeline |
twitter.getMentions | Get tweets mentioning a user |
twitter.searchRecent | Search recent tweets (last 7 days) with a query |
twitter.getUser | Get a user by username |
twitter.getUserById | Get a user by their ID |
twitter.getMe | Get the authenticated user's profile |
twitter.getFollowers | Get followers of a user |
twitter.getFollowing | Get users that a user is following |
twitter.follow | Follow a user (uses authenticated user as source) |
twitter.unfollow | Unfollow a user |
twitter.like | Like a tweet (uses authenticated user) |
twitter.unlike | Unlike a tweet (uses authenticated user) |
twitter.getLikedTweets | Get tweets liked by a user |
twitter.retweet | Retweet a tweet (uses authenticated user) |
twitter.unretweet | Undo a retweet (uses authenticated user) |
twitter.getRetweeters | Get users who retweeted a tweet |
twitter.bookmark | Bookmark a tweet (uses authenticated user) |
twitter.removeBookmark | Remove a bookmarked tweet (uses authenticated user) |
twitter.getBookmarks | Get the authenticated user's bookmarked tweets |
twitter.createList | Create a new list |
twitter.deleteList | Delete a list |
twitter.addListMember | Add a user to a list |
twitter.removeListMember | Remove a user from a list |
twitter.getListTweets | Get tweets from a list |
twitter.sendDm | Send a direct message to a user |
twitter.getDmEvents | Get direct message events |
Examples
Create a new tweet
twitter.createTweet "Hello from RobinPath!"
Delete a tweet by ID
twitter.deleteTweet "1234567890"
Get a single tweet by ID with optional expansions and fields
twitter.getTweet "1234567890" {"tweet.fields": "created_at,public_metrics"}
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/twitter";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
twitter.setToken "AAAA...your-bearer-token"
twitter.createTweet "Hello from RobinPath!"
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/facebook— Facebook module for complementary functionality@robinpath/instagram— Instagram module for complementary functionality@robinpath/linkedin— LinkedIn module for complementary functionality@robinpath/tiktok— TikTok module for complementary functionality@robinpath/pinterest— Pinterest module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
marketing
0
@robinpath/activecampaign
v0.1.1robinpath
ActiveCampaign -- contacts, automations, campaigns, deals, lists, and tags via the ActiveCampaign REST API v3.
0 downloads
...
marketing
0
@robinpath/brevo
v0.1.1robinpath
Brevo module for RobinPath.
0 downloads
...
marketing
0
@robinpath/convertkit
v0.1.0robinpath
Convertkit module for RobinPath.
0 downloads
...
marketing
0
@robinpath/facebook
v0.1.0robinpath
Facebook module for RobinPath.
0 downloads
...
Install
$ robinpath install @robinpath/twitter Version0.1.0
LicenseMIT
Unpacked Size8.8 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

