exhn v1.1.0 ExHN
Interface to the static endpoints of the Hacker News API.
See the API docs for more information.
Summary
Functions
Gets the item with the specified id
Example
iex> ExHN.item(1)
{:ok,
%{"by" => "pg", "descendants" => 15, "id" => 1,
"kids" => [487171, 15, 234509, 454410, 82729], "score" => 61,
"time" => 1160418111, "title" => "Y Combinator", "type" => "story",
"url" => "http://ycombinator.com"}}
Returns a Stream
of items from a given enum
of id
numbers
Example
iex> ExHN.items(10..15) |> Enum.take(1)
[ok: %{"by" => "frobnicate", "descendants" => 0, "id" => 10, "kids" => [454419],
"score" => 3, "time" => 1160421674,
"title" => "PhotoShow: Broadcast Photos to Cable TV", "type" => "story",
"url" => "http://www.techcrunch.com/2006/10/09/broadcast-photos-to-cable-tv/"}]