Releases: tweetapi/node
Releases · tweetapi/node
v1.1.0
What's New
Automatic Retry with Backoff
The SDK now automatically retries on transient errors with exponential backoff + jitter:
- 429 (Rate Limit) — waits the
retryAfterduration from the API, then retries - 5xx (Server Error) — retries with exponential backoff
- Network errors — retries on timeouts and connection failures
- 4xx (Client Error) — never retried (fail immediately)
Fully configurable via the new retry option:
const client = new TweetAPI({
apiKey: "YOUR_API_KEY",
retry: { maxRetries: 5, initialRetryDelay: 2000, backoffMultiplier: 3, maxRetryDelay: 60000 },
});
// Or disable entirely
const client = new TweetAPI({ apiKey: "YOUR_API_KEY", retry: false });Auto-Pagination Helpers
New paginate() and paginatePages() async generators — no more manual cursor loops:
import { paginate } from "tweetapi-node";
for await (const user of paginate(
(cursor) => client.user.getFollowers({ userId: "123", cursor }),
{ maxPages: 5 },
)) {
console.log(user.username);
}Works with any paginated endpoint — followers, tweets, search, lists, communities, etc.
Rate Limit Awareness
- 429
retryAfteris respected automatically during retry - Last rate limit state exposed via
client.rateLimitInfo
New Exports
paginate,paginatePages— pagination helper functionsRetryOptions,RateLimitInfo,PaginateOptions— TypeScript types
Full Changelog
v1.0.0
Official Node.js/TypeScript SDK for TweetAPI.
- 70+ endpoints across 11 resource categories (user, tweet, post, interaction, list, community, space, explore, auth, xchat, DMs)
- Full TypeScript types for all requests and responses
- Typed error handling (RateLimitError, NotFoundError, AuthenticationError, etc.)
- Zero dependencies — native fetch (Node.js 18+)
- ESM + CommonJS dual build
npm install tweetapi-node