@rivi-software/radiotools-sdk in the idiom of each framework. They share the core SDK’s version number; use 0.3.0 or later. Install the binding and the core SDK, because you create the client with the core SDK.
All bindings expose the same reads:
Each read runs once: when the component mounts in React and Vue, and when you create the store in Svelte. The bindings do not poll; call
refresh on the interval from recommendedPollIntervalMs.
For anything else, such as schedule, content, track history, the realtime feed, or playback ingest, call the client directly. A browser can follow the feed with subscribePublicFeed without a station key.
React
Requires React 18 or newer.useGetStation, useGetCurrentBroadcast, useGetNowPlaying, useGetWeather, useGetTraffic, useRecommendedPollInterval. Each returns { data, error, loading, refresh }.
Create the client once, outside components or in a memo, so hooks keep a stable reference.
Vue
Requires Vue 3.4 or newer.useGetStation, useGetCurrentBroadcast, useGetNowPlaying, useGetWeather, useGetTraffic, useRecommendedPollInterval. Each returns refs { data, error, loading } and a refresh() function.
Svelte
Requires Svelte 4 or newer.createGetStationStore, createGetCurrentBroadcastStore, createGetNowPlayingStore, createGetWeatherStore, createGetTrafficStore, createRecommendedPollIntervalStore. Each store holds { data, error, loading } and has a refresh() method. stationStoreLoading(store) derives a loading-only store.
Next.js
Server helpers for the App Router. Requires Next.js 14.2 or newer. The package importsserver-only, so it works only in Server Components, Route Handlers, and Server Actions, and your token never reaches the browser.
RADIOTOOLS_BASE_URL, RADIOTOOLS_STATION_SLUG, and RADIOTOOLS_API_TOKEN in the server environment.
A Server Component with caching (revalidated every 30 seconds by default):
A cached reader for another method:
recommendedPollIntervalMs; reading more often gains nothing.