feat: Add Elixir code generation target #23
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.
Human here, super excited to try this API. I work in Elixir, so took it on myself to whip up a generated API client this morning. Went really well and I'm already integrating it with my stack!
Thanks for doing this!
AI Summary
Adds an Elixir target to the XDK generator, producing a complete, publishable Elixir SDK for the X API v2.
The generated package is published on Hex: xdk_elixir
What's included
Generator (Rust)
xdk-gen/src/elixir/— Generator module using thelanguage!macro with Elixir-appropriate casingxdk-build/src/elixir.rs— CLI module (generates + runsmix format)xdk-gen/templates/elixir/— 12 Jinja2 templates:main_client.j2— CoreXdkclient module (Finch-based HTTP, auth, response handling)client_class.j2— Per-tag API modules (Users, Posts, Lists, etc.)errors.j2— Structured error types via Splodequery.j2— Query parameter encoding with CSV list supportpaginator.j2— Cursor-based pagination viaStream.resource/3streaming.j2— NDJSON streaming for filtered/sample streamstest_structure.j2/test_helper.j2— Bypass-based test scaffoldingmix_exs.j2— Full mix.exs with Hex metadata, dialyzer, credo, quality aliasGenerated SDK features
mix qualityalias (compile warnings-as-errors, format, credo --strict, dialyzer)Testing
mix qualitypasses clean (compile, format, credo, dialyzer)mix docsgenerates with zero warningsUsage