Notes Tutorial demo using this API is at https://spinitron.com/v2-api-demo/. For web integration using iframes and/or JavaScript instead of an API, see...
Bring your own key. This API needs your own Spinitron v2 API key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("spinitron/getpersonas");One install, one key - the same client calls every API on the marketplace.
Filter by Persona name
Amount of items to return
Offset, used together with count
Allows to select only needed fields
Allows to select extra fields
Get Personas
Get Persona by id
Returns playlists optionally filtered by {start} and/or {end} datetimes
Get a Playlist by id
Returns scheduled shows optionally filtered by {start} and/or {end} datetimes
/**
* Spinitronv2API - generated by OmniStream from Spinitron v2 API's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/spinitron";
export class Spinitronv2APIError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `Spinitronv2API error ${status}`);
this.name = "Spinitronv2APIError";
this.status = status;
this.code = code;
}
}
export interface Spinitronv2APIOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class Spinitronv2API {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: Spinitronv2APIOptions = {}) {
if (!token) throw new Error("Spinitronv2API: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new Spinitronv2APIError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Get Personas */
getpersonas(params: { "name"?: string; "count"?: number; "page"?: number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/personas", { params });
}
/** Get Persona by id */
getpersonasId(params: { "id": number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/personas/{id}", { params });
}
/** Returns playlists optionally filtered by {start} and/or {end} datetimes */
getplaylists(params: { "start"?: string; "end"?: string; "show_id"?: number; "persona_id"?: number; "count"?: number; "page"?: number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/playlists", { params });
}
/** Get a Playlist by id */
getplaylistsId(params: { "id": number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/playlists/{id}", { params });
}
/** Returns scheduled shows optionally filtered by {start} and/or {end} datetimes */
getshows(params: { "start"?: string; "end"?: string; "count"?: number; "page"?: number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/shows", { params });
}
/** Get a Show by id */
getshowsId(params: { "id": number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/shows/{id}", { params });
}
/** Returns spins optionally filtered by {start} and/or {end} datetimes */
getspins(params: { "start"?: string; "end"?: string; "playlist_id"?: number; "show_id"?: number; "count"?: number; "page"?: number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/spins", { params });
}
/** Log a Spin */
postspins(): Promise<any> {
return this._request("POST", "/spins", { });
}
/** Get a Spin by id */
getspinsId(params: { "id": number; "fields"?: unknown[]; "expand"?: unknown[] }): Promise<any> {
return this._request("GET", "/spins/{id}", { params });
}
}
export default Spinitronv2API;
No reviews yet. Be the first to rate this API.
Yes. Spinitron v2 API uses apiKey authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
Notes Tutorial demo using this API is at https://spinitron.com/v2-api-demo/. For web integration using iframes and/or JavaScript instead of an API, see... It exposes 9 endpoints over GET, POST, including GET /personas, GET /personas/{id}, GET /playlists.
Install the OmniStream SDK for your language and call Spinitron v2 API through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Spinitron v2 API itself, and Spinitron v2 API's own rate limits still apply to your provider key.
Spotify: Spotify Web API - discover music and podcasts, manage your library, and control playback.
Get a Show by id
Returns spins optionally filtered by {start} and/or {end} datetimes
Log a Spin
Get a Spin by id