feat: Twitter API v2 Core Integration#607
Open
sirius-016 wants to merge 39 commits into
Open
Conversation
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Twitter API v2 Core Integration
Closes #58
What's Included
5 Integration Modules:
Lux.Integrations.Twitter- Auth, headers, configurationLux.Integrations.Twitter.Client- HTTP client with OAuth 2.0 bearer token, rate limit handling, exponential backoff (max 3 retries)Lux.Integrations.Twitter.OAuth- Full OAuth 2.0 PKCE flow (auth URL generation, code exchange, token refresh)Lux.Integrations.Twitter.RateLimiter- ETS-based token bucket rate limiter GenServerLux.Integrations.Twitter.Media- Chunked media upload (INIT/APPEND/FINALIZE) with 5MB chunk support7 Lens Modules (Read Operations):
GetTweet- Fetch tweet by ID with expansionsGetUser- Fetch user by username or IDSearchTweets- Recent search with sorting, pagination, time filtersGetTimeline- User tweet timelineGetMentions- Mentions timelineGetFollowers- User's followersGetFollowing- User's following list10 Prism Modules (Write Operations):
CreateTweet- Tweet with media, polls, reply settingsDeleteTweet- Delete owned tweetCreateThread- Multi-tweet thread with auto reply chainingRetweet- Create/remove retweetLikeTweet- Like/unlike tweetBookmark- Add/remove bookmarkQuoteTweet- Quote tweet with commentFollowUser- Follow/unfollow userBlockUser- Block/unblock userMuteUser- Mute/unmute userTesting:
Documentation:
guides/twitter_integration.livemd) with setup, examples, architectureAcceptance Criteria
Architecture
Follows existing Lux framework patterns:
use Lux.Lens(before_focus/after_focus)use Lux.Prism(handler/2)