Skip to content

feat: add full XDK sample parity & CI for Java, C#, TypeScript, JavaScript, and Python - #215

Merged
tcaldwell-x merged 4 commits into
mainfrom
feat/java-csharp-js-xdk-samples
Nov 24, 2026
Merged

tcaldwell-x merged 4 commits into
mainfrom
feat/java-csharp-js-xdk-samples

Conversation

@tcaldwell-x

@tcaldwell-x tcaldwell-x commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings xdevplatform/samples to full 1-for-1 XDK sample parity and automated build/typecheck CI across all official XDK languages (Python, TypeScript, JavaScript, Java, and C#):

  1. Java 17+ (java/ — 80 samples + pom.xml + README.md)

    • Replaces the 19 legacy pre-XDK Apache HttpClient / com.twitter.clientlib files with 80 com.x:xdk samples across all 11 categories (activity, compliance, direct_messages, lists, media, posts, spaces, streams, usage, users, webhooks).
    • Verified with mvn compile (--release 17, 0 errors across all 80 source files).
  2. C# / .NET 8+ (csharp/ — 80 samples + XdkSamples.csproj + Program.cs CLI + README.md)

    • Adds 80 XDevPlatform.Xdk samples (namespace Xdk) covering cursor pagination (await foreach on *Pages), SSE streaming (await using on EventStream<T>), chunked v2 video upload, and HttpListener + HMACSHA256 webhook CRC validation, plus a dotnet run -- <category>/<sample> runner.
    • Verified with dotnet build -warnaserror (0 warnings, 0 errors).
  3. TypeScript (typescript/ — 84 ESM .ts samples + package.json + tsconfig.json + README.md)

    • Adds idiomatic ESM TypeScript samples (import { Client, OAuth2, PostPaginator, ... } from '@xdevplatform/xdk') across all 84 workflows, runnable via npx tsx <sample>.ts.
    • Strictly type-checked via tsc --noEmit ("strict": true, 0 errors).
  4. JavaScript & Python Parity + Bug Fixes (javascript/, python/)

    • Adds javascript/package.json and backfills all 25 missing JavaScript workflows (activity, direct_messages, media, webhooks, etc.).
    • Fixes pre-existing SDK call bugs surfaced by strict tsc and AST checks in javascript/ (e.g. legacy { body: ... } wrappers, compliance.getJobs('tweets'), updated OpenAPI v2 field/expansion enums) and python/ (stream.activity(), compliance.create_jobs(), compliance.get_jobs_by_id(), lists.delete(), lists.remove_member_by_user_id(), and v2 media.upload()).
  5. CI & Catalog (ci.yml, README.md, llms.txt, api-index.json, .gitignore)

    • Replaces the broken legacy 2021 .github/workflows/cla.yml action (the org-level license/cla app is active) with .github/workflows/ci.yml verifying Python (xdk + api-index.json), JavaScript & TypeScript (node --check + tsc --noEmit --strict), Java (mvn compile), and C# (dotnet build -warnaserror) on PRs, pushes to main, and a weekly schedule.
    • Updates README.md, llms.txt, .gitignore, and api-index.json (v3.0).

Merge note: Merge once xdevplatform/xdk#52 lands and Release SDK publishes com.x:xdk (0.1.0) to Maven Central and XDevPlatform.Xdk (0.1.0) to NuGet.org.

@CLAassistant

CLAassistant commented Nov 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

- Modernize java/ (80 samples + pom.xml + README.md) to official com.x:xdk (Java 17+), replacing legacy raw Apache HttpClient/TwitterCredentials demos
- Add csharp/ (80 samples + XdkSamples.csproj + Program.cs CLI runner + README.md) powered by official XDevPlatform.Xdk (.NET 8+)
- Backfill 25 missing JavaScript samples (activity, direct_messages, media, posts, users, webhooks) + package.json in javascript/ for full parity with python/
- Refresh root README.md, llms.txt, api-index.json, and .gitignore
@tcaldwell-x
tcaldwell-x force-pushed the feat/java-csharp-js-xdk-samples branch from 7226536 to 157f35b Compare November 24, 2026 01:23
@tcaldwell-x tcaldwell-x changed the title feat: add full XDK sample parity for Java (com.x:xdk), C# (XDevPlatform.Xdk), and JavaScript feat: add full XDK sample parity & CI for Java, C#, TypeScript, JavaScript, and Python Nov 24, 2026
@tcaldwell-x
tcaldwell-x merged commit e8e4af3 into main Nov 24, 2026
5 of 6 checks passed
@tcaldwell-x
tcaldwell-x deleted the feat/java-csharp-js-xdk-samples branch November 24, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants