Skip to content

Modernize Rust SDK and add playlist support for 3.0.0 - #7

Merged
wenbinf merged 1 commit into
mainfrom
fix/rust-sdk-sync
Sep 24, 2026
Merged

wenbinf merged 1 commit into
mainfrom
fix/rust-sdk-sync

Conversation

@wenbinf

@wenbinf wenbinf commented Sep 24, 2026

Copy link
Copy Markdown
Member

Summary

Prepare podcast-api 3.0.0 with playlist writes and a modern Cargo workflow. Existing endpoint method names and the Response { response, request } wrapper are preserved. Path identifiers remain positional string arguments, followed by JSON parameters.

  • Add create_playlist, update_playlist, add_playlist_item, delete_playlist_item, and update_playlist_item_notes; generate all 30 methods, the contract snapshot, and README reference from the Listen Notes API specification and Rust registry.
  • Correct path/query/form encoding, including values such as A & B, and preserve empty notes/descriptions. Fix recursive error formatting, retain response status/headers/body, classify 403 responses, and use podcast-api-rust <version> as the User-Agent.
  • Upgrade to Rust 2024 and reqwest 0.13.5, retain only reqwest and serde_json as direct runtime dependencies, move Tokio to development dependencies, and commit Cargo.lock. Replace the separate sample crate with a standard Cargo example.
  • Replace default live API tests with loopback HTTP tests and compiled no_run README examples. Add separate credential-free public-mock integration and CI for the minimum/current compiler, formatting, Clippy, documentation, and standalone crate packaging.

Breaking changes

  • Minimum Rust version is 1.88; custom HTTP clients use reqwest 0.13.
  • HTTP error variants now carry response context, so matches such as Error::NotFoundError become Error::NotFoundError(_). The enum is non-exhaustive and requires a fallback arm.
  • Default clients disable redirects and retries and use 30-second total / 10-second connection timeouts. Supplied custom reqwest clients retain their own policies.

Validation

  • Rust 1.88.0 and 1.98.1: seven offline tests covering every method and transport edge cases; all 32 documentation examples compiled.
  • Three public-mock integration tests passed, covering 34 requests across all methods plus encoding, empty fields, podcast additions, and 404 handling. No production requests or credentials were used.
  • rustfmt, Clippy with warnings denied, and rustdoc with warnings denied passed.
  • The crate was packaged, inspected, unpacked outside the monorepo, and its offline tests and examples passed independently.
  • Monorepo companion changes passed 30 generator tests, 12 Django documentation tests, frontend typechecking, and 77 snippet/runner tests. Generation checks pass for all five managed SDKs.

The generator, Rust registry, website snippet changes, and development skill live in the companion monorepo changes. This PR contains the independent SDK and its generated outputs. Publication to crates.io and enabling the new website SDK snippets remain separate release steps.

@wenbinf
wenbinf merged commit 695f77c into main Sep 24, 2026
4 checks passed
@wenbinf
wenbinf deleted the fix/rust-sdk-sync branch September 24, 2026 04:18
@wenbinf
wenbinf restored the fix/rust-sdk-sync branch September 24, 2026 04:18
@wenbinf
wenbinf deleted the fix/rust-sdk-sync branch September 24, 2026 04:18
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.

1 participant