diff --git a/changelog.mdx b/changelog.mdx index a66861bf1..f605fb046 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -7,6 +7,17 @@ keywords: ["changelog", "API updates", "release notes", "what's new", "API chang To subscribe to updates, please [**“Turn on notifications”**](https://help.x.com/en/managing-your-account/notifications-on-mobile-devices#:~:text=In%20the%20top%20menu,%20you,you%20would%20like%20to%20receive) for [**@API**](https://x.com/api). You can also follow this changelog in your feed reader via the [**RSS feed**](https://docs.x.com/changelog/rss.xml). + + ### .NET Framework 4.7.2+ support for C# XDK (`XDevPlatform.Xdk` `0.4.0`) + + The official **C# / .NET XDK** ([`XDevPlatform.Xdk`](https://www.nuget.org/packages/XDevPlatform.Xdk/0.4.0) `0.4.0`) now multi-targets `netstandard2.0` alongside `net8.0`, enabling **.NET Framework 4.7.2+** applications to call the X API v2 (including `/2/chat/*`, OAuth 1.0a, OAuth 2.0 PKCE, pagination, and real-time streaming) with zero public API changes: + + - **Zero external dependencies on `.NET 8+`:** `net8.0` keeps its zero-dependency layout; `netstandard2.0` adds Microsoft's `System.Text.Json` (`8.0.5`), `Microsoft.Bcl.AsyncInterfaces` (`8.0.0`), and `System.Threading.Tasks.Extensions` (`4.5.4`). + - **Full streaming & auth parity on `.NET Framework 4.7.2`:** Supports `OAuth1`, `OAuth2Pkce`, `Paginator`, and chunked `EventStream` with keep-alive callbacks and `IdleTimeout` recovery. On older Windows hosts, enable TLS 1.2 at startup with `ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;`. + + Install with `dotnet add package XDevPlatform.Xdk --version 0.4.0`. See [C# / .NET XDK](/xdks/csharp/overview). + + ### Linux ARM64 (glibc and musl) support for Go Chat XDK (`go/chatxdk` `v0.7.12`) diff --git a/enterprise-api/getting-started/important-resources.mdx b/enterprise-api/getting-started/important-resources.mdx index c48b2af65..32c52ab26 100644 --- a/enterprise-api/getting-started/important-resources.mdx +++ b/enterprise-api/getting-started/important-resources.mdx @@ -37,7 +37,7 @@ Bookmark these essential resources for X API development. | [Python SDK](/xdks/python/overview) | Official Python library (`xdk`) | | [TypeScript SDK](/xdks/typescript/overview) | Official TypeScript/JavaScript library (`@xdevplatform/xdk`) | | [Java SDK](/xdks/java/overview) | Official Java 8+ library (`com.x:xdk`) | -| [C# SDK](/xdks/csharp/overview) | Official .NET 8+ library (`XDevPlatform.Xdk`) | +| [C# SDK](/xdks/csharp/overview) | Official .NET 8+ / .NET Framework 4.7.2+ library (`XDevPlatform.Xdk`) | | [OpenAPI Spec](https://api.x.com/2/openapi.json) | Machine-readable API specification | --- diff --git a/enterprise-api/introduction.mdx b/enterprise-api/introduction.mdx index 893cf96d0..cadbc001f 100644 --- a/enterprise-api/introduction.mdx +++ b/enterprise-api/introduction.mdx @@ -230,7 +230,7 @@ Enterprise access powers the most demanding use cases on X. Official Java 8+ library (`com.x:xdk`). - Official .NET 8+ library (`XDevPlatform.Xdk`). + Official .NET 8+ / .NET Framework 4.7.2+ library (`XDevPlatform.Xdk`). diff --git a/important-resources.mdx b/important-resources.mdx index 1416f9f56..24f7ae296 100644 --- a/important-resources.mdx +++ b/important-resources.mdx @@ -38,7 +38,7 @@ Bookmark these essential resources for X API development. | [Python SDK](/xdks/python/overview) | Official Python library (`xdk`) | | [TypeScript SDK](/xdks/typescript/overview) | Official TypeScript/JavaScript library (`@xdevplatform/xdk`) | | [Java SDK](/xdks/java/overview) | Official Java 8+ library (`com.x:xdk`) | -| [C# SDK](/xdks/csharp/overview) | Official .NET 8+ library (`XDevPlatform.Xdk`) | +| [C# SDK](/xdks/csharp/overview) | Official .NET 8+ / .NET Framework 4.7.2+ library (`XDevPlatform.Xdk`) | | [OpenAPI Spec](https://api.x.com/2/openapi.json) | Machine-readable API specification | --- diff --git a/tools-and-libraries.mdx b/tools-and-libraries.mdx index 8267a0c1d..f96d96a97 100644 --- a/tools-and-libraries.mdx +++ b/tools-and-libraries.mdx @@ -26,7 +26,7 @@ Client libraries for the X API v2, generated from the OpenAPI spec with auth, pa `com.x:xdk` · Java 8+ - `dotnet add package XDevPlatform.Xdk` · .NET 8+ + `dotnet add package XDevPlatform.Xdk` · .NET 8+ / .NET Framework 4.7.2+ diff --git a/tools/csharp-xdk.mdx b/tools/csharp-xdk.mdx index 0e8dbc40e..5a512871a 100644 --- a/tools/csharp-xdk.mdx +++ b/tools/csharp-xdk.mdx @@ -5,11 +5,11 @@ description: C# and .NET client library for the X API v2. keywords: ["C# SDK", ".NET SDK", "XDK", "C#", "dotnet", "NuGet", "XDevPlatform.Xdk", "X API"] --- -`XDevPlatform.Xdk` ([GitHub](https://github.com/xdevplatform/xdk-csharp)) is the official C# / .NET client library for the X API v2 (.NET 8+). +`XDevPlatform.Xdk` ([GitHub](https://github.com/xdevplatform/xdk-csharp)) is the official C# / .NET client library for the X API v2 (**.NET 8+** and **.NET Framework 4.7.2+** via `netstandard2.0`). - `dotnet add package XDevPlatform.Xdk` · .NET 8+ + `dotnet add package XDevPlatform.Xdk` · .NET 8+ / .NET Framework 4.7.2+ Source code and issues. @@ -28,13 +28,13 @@ dotnet add package XDevPlatform.Xdk ```xml PackageReference - + ``` -Requires .NET 8.0+. +Supports .NET 8.0+ (`net8.0`, zero external dependencies) and .NET Framework 4.7.2+ (`netstandard2.0`). On older Windows versions, enable TLS 1.2 at startup with `ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;`. --- diff --git a/x-api/introduction.mdx b/x-api/introduction.mdx index d7a7df090..e9978a999 100644 --- a/x-api/introduction.mdx +++ b/x-api/introduction.mdx @@ -168,7 +168,7 @@ Earn free [xAI API](https://docs.x.ai) credits when you purchase X API credits Official Java 8+ library (`com.x:xdk`). - Official .NET 8+ library (`XDevPlatform.Xdk`). + Official .NET 8+ / .NET Framework 4.7.2+ library (`XDevPlatform.Xdk`). diff --git a/xdks/csharp/install.mdx b/xdks/csharp/install.mdx index ab5e6e9c7..4ff793ad5 100644 --- a/xdks/csharp/install.mdx +++ b/xdks/csharp/install.mdx @@ -4,7 +4,7 @@ sidebarTitle: Install description: Add the C# / .NET XDK from NuGet. --- -Install `XDevPlatform.Xdk` from [NuGet](https://www.nuget.org/packages/XDevPlatform.Xdk). Requires .NET 8.0+. +Install `XDevPlatform.Xdk` from [NuGet](https://www.nuget.org/packages/XDevPlatform.Xdk). Supports **.NET 8.0+** (`net8.0`, zero external dependencies) and **.NET Framework 4.7.2+** (via `netstandard2.0`, adding `System.Text.Json`, `Microsoft.Bcl.AsyncInterfaces`, and `System.Threading.Tasks.Extensions`). @@ -14,7 +14,7 @@ dotnet add package XDevPlatform.Xdk ```xml PackageReference (.csproj) - + ``` @@ -24,6 +24,14 @@ Install-Package XDevPlatform.Xdk +## .NET Framework 4.7.2+ TLS 1.2 note + +On older Windows versions (such as Windows Server 2012 R2) or applications with legacy `AppContext` TLS overrides, enable TLS 1.2 at startup: + +```csharp +System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12; +``` + ## Custom `HttpClient` In ASP.NET Core or worker services using `IHttpClientFactory`, pass a managed `HttpClient` via `XClientOptions.HttpClient`: diff --git a/xdks/csharp/llms.txt b/xdks/csharp/llms.txt index dca0d8111..920a08ca5 100644 --- a/xdks/csharp/llms.txt +++ b/xdks/csharp/llms.txt @@ -1,6 +1,6 @@ -# C# XDK (`XDevPlatform.Xdk` v0.3.2) +# C# XDK (`XDevPlatform.Xdk` v0.4.0) -> Official C# client library for the X API v2 (.NET 8.0+). Install with `dotnet add package XDevPlatform.Xdk`. +> Official C# client library for the X API v2 (.NET 8.0+ / .NET Framework 4.7.2+). Install with `dotnet add package XDevPlatform.Xdk`. ## Guides diff --git a/xdks/csharp/overview.mdx b/xdks/csharp/overview.mdx index 4f1fc289e..98a1b5dc9 100644 --- a/xdks/csharp/overview.mdx +++ b/xdks/csharp/overview.mdx @@ -4,11 +4,11 @@ sidebarTitle: Overview description: C# and .NET client library for the X API v2. --- -`XDevPlatform.Xdk` is the official C# / .NET SDK for the X API v2 (.NET 8+). It uses `System.Net.Http` and `System.Text.Json` with no extra runtime dependencies, async methods with `CancellationToken`, `IAsyncEnumerable` pagination, and `EventStream`. +`XDevPlatform.Xdk` is the official C# / .NET SDK for the X API v2 (**.NET 8+** and **.NET Framework 4.7.2+** via `netstandard2.0`). It uses `System.Net.Http` and `System.Text.Json` with zero extra runtime dependencies on `net8.0`, async methods with `CancellationToken`, `IAsyncEnumerable` pagination, and `EventStream`. - `dotnet add package XDevPlatform.Xdk` · .NET 8+ + `dotnet add package XDevPlatform.Xdk` · .NET 8+ / .NET Framework 4.7.2+ Source code and issues. diff --git a/xdks/csharp/reference/overview.mdx b/xdks/csharp/reference/overview.mdx index 4d525dee3..3da3f04fe 100644 --- a/xdks/csharp/reference/overview.mdx +++ b/xdks/csharp/reference/overview.mdx @@ -1,14 +1,14 @@ --- title: "API Reference" sidebarTitle: "Overview" -description: "Client and method reference for the C# XDK (XDevPlatform.Xdk v0.3.2)." +description: "Client and method reference for the C# XDK (XDevPlatform.Xdk v0.4.0)." --- -Client setup and method reference for `XDevPlatform.Xdk` `v0.3.2`. +Client setup and method reference for `XDevPlatform.Xdk` `v0.4.0`. - `XDevPlatform.Xdk` `v0.3.2` · .NET 8.0+ + `XDevPlatform.Xdk` `v0.4.0` · .NET 8.0+ / .NET Framework 4.7.2+ Source code and issues. diff --git a/xdks/llms.txt b/xdks/llms.txt index 7adf30b1f..8e84cdc21 100644 --- a/xdks/llms.txt +++ b/xdks/llms.txt @@ -7,7 +7,7 @@ - **Python**: `xdk` (`v0.13.2`, Python 3.8+) — `pip install xdk` — [Index](https://docs.x.com/xdks/python/llms.txt) - **TypeScript**: `@xdevplatform/xdk` (`v0.9.2`, Node.js 18+ (ESM & CommonJS)) — `npm install @xdevplatform/xdk` — [Index](https://docs.x.com/xdks/typescript/llms.txt) - **Java**: `com.x:xdk` (`v0.4.0`, Java 8+) — `implementation("com.x:xdk:0.4.0")` — [Index](https://docs.x.com/xdks/java/llms.txt) -- **C#**: `XDevPlatform.Xdk` (`v0.3.2`, .NET 8.0+) — `dotnet add package XDevPlatform.Xdk` — [Index](https://docs.x.com/xdks/csharp/llms.txt) +- **C#**: `XDevPlatform.Xdk` (`v0.4.0`, .NET 8.0+ / .NET Framework 4.7.2+) — `dotnet add package XDevPlatform.Xdk` — [Index](https://docs.x.com/xdks/csharp/llms.txt) - **Ruby**: `xdk` (`v0.1.0`, Ruby 3.0+) — `gem install xdk` — [Index](https://docs.x.com/xdks/ruby/llms.txt) ## Guides diff --git a/xdks/overview.mdx b/xdks/overview.mdx index 7abe48aee..d6d0059b1 100644 --- a/xdks/overview.mdx +++ b/xdks/overview.mdx @@ -18,7 +18,7 @@ The X Developer Kits (XDKs) are X's client libraries for the X API v2, generated `com.x:xdk` · Java 8+ - `dotnet add package XDevPlatform.Xdk` · .NET 8+ + `dotnet add package XDevPlatform.Xdk` · .NET 8+ / .NET Framework 4.7.2+ `gem install xdk` · Ruby 3.0+ @@ -34,7 +34,7 @@ The X Developer Kits (XDKs) are X's client libraries for the X API v2, generated | **Python** | `xdk` | Python 3.8+ | [PyPI](https://pypi.org/project/xdk/) | [xdk-python](https://github.com/xdevplatform/xdk-python) | | **TypeScript / JS** | `@xdevplatform/xdk` | Node.js 18+ | [npm](https://www.npmjs.com/package/@xdevplatform/xdk) | [xdk-typescript](https://github.com/xdevplatform/xdk-typescript) | | **Java** | `com.x:xdk:0.4.0` | Java 8+ | [Maven Central](https://central.sonatype.com/artifact/com.x/xdk) | [xdk-java](https://github.com/xdevplatform/xdk-java) | -| **C# / .NET** | `XDevPlatform.Xdk` | .NET 8.0+ | [NuGet](https://www.nuget.org/packages/XDevPlatform.Xdk) | [xdk-csharp](https://github.com/xdevplatform/xdk-csharp) | +| **C# / .NET** | `XDevPlatform.Xdk` | .NET 8.0+ / .NET Framework 4.7.2+ | [NuGet](https://www.nuget.org/packages/XDevPlatform.Xdk) | [xdk-csharp](https://github.com/xdevplatform/xdk-csharp) | | **Ruby** | `xdk` | Ruby 3.0+ | [RubyGems](https://rubygems.org/gems/xdk) | [xdk-ruby](https://github.com/xdevplatform/xdk-ruby) | ---