treeshateyou-verified-feed
v0.1.1
Published
Verified Trees Hate You game info feed client (status, timeline, sources).
Maintainers
Readme
treeshateyou-verified-feed
Minimal JavaScript client for verified Trees Hate You information from:
https://treeshateyou.com/api/trees-hate-you-livehttps://treeshateyou.com/api/trees-hate-you-kb
Install
npm install treeshateyou-verified-feedQuick Start
import { getSnapshot, getLatestTimeline, getStatus, isStale } from "treeshateyou-verified-feed";
const snapshot = await getSnapshot();
console.log(snapshot.latestUpdate);
const latestThree = await getLatestTimeline(3);
console.log(latestThree);
const status = await getStatus();
console.log(status.steamStatus, status.demoStatus);
const stale = await isStale(7);
console.log({ stale });API
createClient(options?)getKnowledgeBase(options?)getLiveData(options?)getSnapshot(options?)getLatestTimeline(limit?, options?)getStatus(options?)getSources(options?)isStale(maxDays?, options?)
options
{
baseUrl?: string;
kbPath?: string;
livePath?: string;
kbUrl?: string;
liveUrl?: string;
fetch?: typeof fetch;
requestInit?: RequestInit;
}Use baseUrl for mirror domains or local/staging deployments.
Publish (maintainer)
Inside this package directory:
npm login
npm publish --access publicIf package name is taken, change the name field in package.json.
