Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get top level Hacker News API data
const topStoriesURL = `https://hacker-news.firebaseio.com/v0/topstories.json`
const newStoriesURL = `https://hacker-news.firebaseio.com/v0/newstories.json`
const bestStoriesURL = `https://hacker-news.firebaseio.com/v0/beststories.json`
const getItemURL = storyId =>
`https://hacker-news.firebaseio.com/v0/item/${storyId}.json`
const topResults = await axios.get(topStoriesURL)
const newResults = await axios.get(newStoriesURL)
const bestResults = await axios.get(bestStoriesURL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.