Copyright | (c) David Johnson 2014-2016 |
---|---|
Maintainer | djohnson.m@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Haskell port of https://github.com/HackerNews/API
- data Updates = Updates {}
- newtype MaxItem = MaxItem Int
- newtype TopStories = TopStories [Int]
- newtype NewStories = NewStories [Int]
- newtype BestStories = BestStories [Int]
- newtype AskStories = AskStories [Int]
- newtype ShowStories = ShowStories [Int]
- newtype JobStories = JobStories [Int]
- data User = User {}
- newtype Karma = Karma Int
- newtype UserId = UserId Text
- newtype Delay = Delay Int
- newtype Created = Created Int
- newtype About = About Text
- newtype Submitted = Submitted [Int]
- newtype ItemId = ItemId Int
- newtype Deleted = Deleted Int
- data ItemType
- newtype UserName = UserName Text
- newtype ItemText = ItemText Text
- newtype Dead = Dead Bool
- newtype Parent = Parent Int
- newtype Time = Time Integer
- newtype Kids = Kids [Int]
- newtype URL = URL Text
- newtype Score = Score Int
- newtype Title = Title Text
- newtype Parts = Parts [Int]
- newtype Descendants = Descendants Int
- data Item = Item {
- itemId :: Maybe ItemId
- itemDeleted :: Maybe Deleted
- itemType :: ItemType
- itemBy :: Maybe UserName
- itemTime :: Maybe Time
- itemText :: Maybe ItemText
- itemDead :: Maybe Dead
- itemParent :: Maybe Parent
- itemKids :: Maybe Kids
- itemURL :: Maybe URL
- itemScore :: Maybe Score
- itemTitle :: Maybe Title
- itemParts :: Maybe Parts
- itemDescendants :: Maybe Descendants
- data HackerNewsError
Documentation
The item and profile changes are at https://hacker-news.firebaseio.com/v0/updates
The current largest item id is at https://hacker-news.firebaseio.com/v0/maxitem. You can walk backward from here to discover all items.
newtype TopStories Source #
newtype NewStories Source #
newtype BestStories Source #
newtype AskStories Source #
newtype ShowStories Source #
newtype JobStories Source #
Users are identified by case-sensitive ids, and live under https://hacker-news.firebaseio.com/v0/user/. Only users that have public activity (comments or story submissions) on the site are available through the API.
User | |
|
The user's karma.
The user's unique username. Case-sensitive. Required.
Delay in minutes between a comment's creation and its visibility to other users.
Creation date of the user, in Unix Time.
The user's optional self-description. HTML.
List of the user's stories, polls and comments.
The item's unique id.
true
if the item is deleted.
The type of item. One of "job", "story", "comment", "poll", or "pollopt"
The username of the item's author.
The comment, story or poll text. HTML.
true
if the item is dead.
The item's parent. For comments, either another comment or the relevant story. For pollopts, the relevant poll.
Creation date of the item, in Unix Time.
The ids of the item's comments, in ranked display order.
The URL of the story.
The story's score, or the votes for a pollopt.
The title of the story, poll or job.
A list of related pollopts, in display order.
newtype Descendants Source #
In the case of stories or polls, the total comment count.
Stories, comments, jobs, Ask HNs and even polls are just items. They're identified by their ids, which are unique integers, and live under https://hacker-news.firebaseio.com/v0/item/.
Item | |
|
data HackerNewsError Source #
Error handling for HackerNewsAPI