Skip to main content
Besides TypeScript, the SDK repository ships small REST clients for common backend and mobile languages. They are starters: they handle authentication, the station document, weather, traffic, and playback ingest. They return untyped JSON: a dictionary or map in most languages, JsonElement in .NET, and JsonObject in Kotlin. They do not include GraphQL, the public realtime feed, content by slug, sorting and filters, the draft preview handoff, ETag caching, retries, or response validation. For the realtime feed, use the TypeScript SDK 0.3.0 or later, or follow the feed yourself. Where you need more, use one of these routes:

Packages

The starters live in the packages/ folder of the radiotools-sdk repository. The repository’s release workflow publishes only the npm packages, so the starters are not part of the 0.3.0 release group and have no registry release. Install them from the repository:

What each client implements

Python also defines get_schemas, get_content, get_content_record, get_content_by_slug, get_schedule, get_programs, get_current_broadcast, get_now_playing, and get_track_history, but they raise NotImplementedError until you extend them. Use the resource links from the station document, as above. Weather and traffic read the station document first, so each call sends two requests.

Configuration

Every client takes the base URL, station slug, and one or both tokens. Python, Go, .NET, Ruby, and PHP also have a helper that reads the shared environment variables; Kotlin and Swift do not. Weather and traffic return nothing when the station does not publish them.

Python

Go

.NET

Ruby

PHP

Kotlin

The Kotlin methods block, so call them off the main thread on Android.

Swift

Report playback from any language

Encoders and automation often run outside TypeScript. Every starter client has a playback method that posts to POST /api/v1/integrations/playback: report_playback in Python and Ruby, ReportPlayback in Go, ReportPlaybackAsync in .NET, and reportPlayback in PHP, Kotlin, and Swift. Each takes an optional station ID (in Go, pass "" to skip it); without one, the client sends its station slug. The method needs the ingest:write token and follows the rules in Now-playing ingest: send artist with title, or a streamTitle, keep the body under 8 KiB, and set a stable eventId so your own retries stay idempotent. Unlike the TypeScript SDK, these clients do not add an eventId or retry for you.

Errors

The starters raise or return a generic error for non-success responses. They do not parse the RadioTools error body. If you need error.code and requestId, read the response body — see Errors and versioning.