Discover and explore top open-source AI tools and projects—updated daily.
xdevplatformAPI v2 code samples for diverse operations
Top 15.3% on SourcePulse
This repository provides working code samples for the X API v2, targeting developers needing to integrate with X's platform. It offers practical examples across multiple programming languages, enabling quick implementation of features like posting, user lookups, timeline management, and more, thereby accelerating development and reducing integration friction.
How It Works
The project is structured by programming language (Python, JavaScript, Ruby, Java, R), each containing numerous examples demonstrating specific X API v2 endpoints. It supports various authentication methods, including Bearer Token for read-only access, OAuth 1.0a for user actions, and OAuth 2.0 PKCE for newer functionalities. This multi-language, endpoint-focused approach simplifies learning and applying the X API.
Quick Start & Requirements
cd python), install dependencies (pip install -r requirements.txt for Python, npm install for JavaScript, bundle install for Ruby), then execute example scripts (e.g., python posts/recent_search.py).BEARER_TOKEN, CONSUMER_KEY, CONSUMER_SECRET) must be set.Highlighted Details
llms.txt for LLM-friendly documentation and api-index.json as a machine-readable endpoint catalog.Maintenance & Community
No specific details on contributors, sponsorships, or community channels (like Discord/Slack) are provided in the README.
Licensing & Compatibility
Licensed under Apache 2.0. This license is permissive and generally compatible with commercial use and closed-source projects.
Limitations & Caveats
The repository contains only sample code; it does not provide a full SDK or framework. Specific examples might require updates as the X API evolves. Direct Messages and Media Upload examples are currently limited to Python.
2 months ago
Inactive
llamastack
jlowin
modelcontextprotocol