1.0.0 • Published 8 years ago
wtfjht-client v1.0.0
wtfjht-client
Introduction
Going to https://whatthefuckjusthappenedtoday.com/ is "today's essential guide to the daily shock and awe in national politics."
It has a very basic API with three endpoints
/api/today.json- A list of things that have happened today
/api/v1/random.json- A list of all the days, along with the URLs for the specific pages for those days
- I think the endpoint is called
randombecause it powers the "choose random day" feature
/api/v1/status.json- A basic status page with information like "has Trump been impeached"
API
getToday- get all the fucking stories that fucking happened today
import { getToday } from 'wtfjht-client';
const whatTheFuckJustHappenedToday = await getToday();getAllDailyPages- get details for all tracked days
import { getAllDailyPages } from 'wtfjht-client';
const allDailyPages = await getAllDailyPages();getStatus- get the current state of things
import { getStatus } from 'wtfjht-client';
const status = await getStatus();1.0.0
8 years ago