Using Scala to interact with the Hacker News API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Using Scala to interact with the Hacker News API

This is Scala project written to supplement a blog post series on using Scala to access Hacker News users and stories.

Using scalaj-http and uPickle

Hacker News API Part 1

Use Fetch and demonstrate parallel execution and caching

Hacker News API Part 2

By running the main program you can view a text version of the Hacker News front page in your terminal (or IDE output).


Run sbt and at the command line choose to run [1] (examples.FrontPage) or [2] (examples.FrontPageWithFetch)

An interative prompt is enabled where you can choose from 0-49 pages of hacker news front page items.

In the fetch example you can see that items are only retreived once then cached for the next time.

Example output

1. Deep Learning for Coders – Launching Deep Learning Part 2 (
  331 points by jph00 at 8 hours ago 50 comments

2. PSA: The CopyFish OCR Chrome extension has been hijacked. Disable immediately (
  156 points by timr at 6 hours ago 70 comments

3. Lindy effect (
  94 points by bushido at 5 hours ago 19 comments

4. We Evolved to Run But We're Doing It Wrong (
  169 points by thomyorkie at 8 hours ago 106 comments

5. Why I left Medium and moved back to my own domain (
  330 points by ingve at 15 hours ago 165 comments

6. Cryptocurrency miners are renting Boeing 747s to ship graphics cards (
  107 points by z3t1 at 6 hours ago 62 comments

7. LaTeX Math in MS Office (
  75 points by ygra at 7 hours ago 17 comments

8. Jim Mellon and high-profile partners roll the dice on an anti-aging upstart (
  91 points by discombobulate at 8 hours ago 45 comments

9. Tools for Remote Software Development and Pair Programming (
Disconnected from the target VM, address: '', transport: 'socket'
  85 points by davidjnelson at 9 hours ago 19 comments

10. Implementing Algebraic Effects in C (
  86 points by necrodome at 8 hours ago 5 comments