Important
New client versions default to https://neuro.appstun.net/api/v2. v1 (/api/v1) is deprecated and will be turned off on 2026-11-01.
This guide covers changes in NeuroInfoAPI-Client.ts / .js when upgrading from the v1-default client to the v2-default client. For raw HTTP migration (envelopes, endpoint renames), see the full API migration guide.
- Update to the latest client files or
neuroinfoapi-clientnpm package. - Remove manual
baseUrl: ".../api/v1"unless you intentionally stay on v1 during transition. - Replace
schedule.isFinalchecks withstatusorisScheduleFinal(status). - Update
getVodcall sites: parameter renamed fromstreamIdtoid. - Update
getSchedulecall sites: argument order is now(week, year?). - Replace
getCurrentSubathons()path expectation: server route is now/subathon. - Stop using
getSubathonYears(true)/?detailed. - Use
getDevstreamTimes()for devstream timestamps. - Blog: use
result.data.entries, notresult.data.data.entries. - WebSocket: default URL is
/api/v2/ws; handlescheduleUpdate.statusinstead ofisFinal.
| Option | v1 client | v2 client |
|---|---|---|
REST baseUrl |
https://neuro.appstun.net/api/v1 |
https://neuro.appstun.net/api/v2 |
WS baseUrl |
wss://neuro.appstun.net/api/ws |
wss://neuro.appstun.net/api/v2/ws |
| Response unwrapping | None | Unwraps { data: T } |
| HTTP dependency | Older external helper | Built-in HttpClient on top of standard fetch |
The client still returns { data, error } — that is the client result type, not the HTTP envelope.
private async request<T>(url: string, params?: Record<string, any>): Promise<ApiResult<T>> {
const response = await this.apiInstance.request<T>(url, { query: params });
return { data: response, error: null };
}private async request<T>(url: string, params?: Record<string, any>): Promise<ApiResult<T>> {
const response = await this.apiInstance.request<any>(url, { query: params });
const data =
response && typeof response === "object" && "data" in response ? response.data : response;
return { data: data as T, error: null };
}| Method | v1 | v2 |
|---|---|---|
getVod(id) |
GET /twitch/vod?streamId= |
GET /twitch/vod?id= |
getSchedule(week, year?) |
was getSchedule(year?, week?) |
week is required first argument |
getCurrentSubathons() |
GET /subathon/current |
GET /subathon |
getBlogFeed(raw?) |
GET /blog/feed |
GET /blog |
getSubathonYears(detailed?) |
?detailed overload |
always year -> name map |
getDevstreamTimes() |
not available | GET /devstream/times |
Older client typings could force:
const { data } = await client.getBlogFeed();
const entries = data?.data?.entries;Now use:
const { data } = await client.getBlogFeed();
const entries = data?.entries;// v1
interface ScheduleResponse {
year: number;
week: number;
schedule: ScheduleEntry[];
isFinal: boolean;
}
// v2
type ScheduleStatus = "confirmed" | "auto_discord" | "auto_twitch";
interface ScheduleResponse {
year: number;
week: number;
schedule: ScheduleEntry[];
status: ScheduleStatus;
}v2 exports isScheduleFinal(status):
import { isScheduleFinal } from "./NeuroInfoAPI-Client";
const { data } = await client.getLatestSchedule();
if (data && !isScheduleFinal(data.status)) {
console.log("Schedule may still change");
}v2 adds optional fields from the REST error envelope:
class NeuroApiError {
code: string;
message: string;
status?: number;
timestamp?: number;
path?: string;
}| v1 default | v2 default | |
|---|---|---|
| URL | wss://neuro.appstun.net/api/ws |
wss://neuro.appstun.net/api/v2/ws |
scheduleUpdate type |
isFinal |
status |
Ticket auth now defaults to GET /api/v2/ws/ticket when the WebSocket URL is /api/v2/ws.
The polling-based eventer still works, but prefer NeuroInfoApiWebsocketClient for new work.
npm install neuroinfoapi-client@latestimport { NeuroInfoApiClient } from "neuroinfoapi-client";
const client = new NeuroInfoApiClient("token");
const schedule = await client.getLatestSchedule();
if (schedule.data?.isFinal) console.log("Final schedule");import { NeuroInfoApiClient, isScheduleFinal } from "neuroinfoapi-client";
const client = new NeuroInfoApiClient("token");
const schedule = await client.getLatestSchedule();
if (schedule.data && isScheduleFinal(schedule.data.status)) {
console.log("Final schedule");
}ApiResult<T>pattern:{ data: T | null, error: NeuroApiError | null }setApiToken()/ Bearer auth- 10s timeout default
- WebSocket event names except the
scheduleUpdatepayload shape