-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | API for Hacker News -- -- API for news.ycombinator.com @package hackernews @version 0.3.0.0 module Web.HackerNews -- | HackerNews API request method hackerNews :: FromJSON a => HackerNews a -> IO (Either HackerNewsError a) -- | Retrieve a Item by ItemId getItem :: ItemId -> HackerNews Item -- | Retrieve a Story by StoryId getStory :: StoryId -> HackerNews Story -- | Retrieve a Comment by CommentId getComment :: CommentId -> HackerNews Comment -- | Retrieve a Poll by PollId getPoll :: PollId -> HackerNews Poll -- | Retrieve a PollOpt by PollOptId getPollOpt :: PollOptId -> HackerNews PollOpt -- | Retrieve a User by UserId getUser :: UserId -> HackerNews User -- | Retrieve a Job getJob :: JobId -> HackerNews Job -- | Retrieve the Top Stories on Hacker News getTopStories :: HackerNews TopStories -- | Retrieve the largest ItemId getMaxItem :: HackerNews MaxItem -- | Retrieve the latest updates getUpdates :: HackerNews Update -- | Core Type type HackerNews a = EitherT HackerNewsError (ReaderT Connection IO) a -- | Error Types data HackerNewsError ConnectionError :: HackerNewsError ParseError :: HackerNewsError RequestError :: HackerNewsError -- | Item Type data Item ItemComment :: Comment -> Item ItemPoll :: Poll -> Item ItemPollOpt :: PollOpt -> Item ItemStory :: Story -> Item ItemJob :: Job -> Item -- | Item ID for a Item object newtype ItemId ItemId :: Int -> ItemId -- | Comment Object data Comment Comment :: Text -> CommentId -> Maybe [Int] -> Int -> Text -> UTCTime -> Text -> Bool -> Bool -> Comment commentBy :: Comment -> Text commentId :: Comment -> CommentId commentKids :: Comment -> Maybe [Int] commentParent :: Comment -> Int commentText :: Comment -> Text commentTime :: Comment -> UTCTime commentType :: Comment -> Text commentDeleted :: Comment -> Bool commentDead :: Comment -> Bool -- | CommentId for a Comment Object newtype CommentId CommentId :: Int -> CommentId -- | Poll Object data Poll Poll :: Text -> PollId -> [Int] -> [Int] -> Int -> Text -> UTCTime -> Text -> Text -> Bool -> Bool -> Poll pollBy :: Poll -> Text pollId :: Poll -> PollId pollKids :: Poll -> [Int] pollParts :: Poll -> [Int] pollScore :: Poll -> Int pollText :: Poll -> Text pollTime :: Poll -> UTCTime pollTitle :: Poll -> Text pollType :: Poll -> Text pollDeleted :: Poll -> Bool pollDead :: Poll -> Bool -- | Poll Id for a Poll newtype PollId PollId :: Int -> PollId -- | Poll Opt Object data PollOpt PollOpt :: Text -> PollOptId -> Int -> Int -> Text -> UTCTime -> Text -> Bool -> Bool -> PollOpt pollOptBy :: PollOpt -> Text pollOptId :: PollOpt -> PollOptId pollOptParent :: PollOpt -> Int pollOptScore :: PollOpt -> Int pollOptText :: PollOpt -> Text pollOptTime :: PollOpt -> UTCTime pollOptType :: PollOpt -> Text pollOptDeleted :: PollOpt -> Bool pollOptDead :: PollOpt -> Bool -- | Poll Option Id for a PollOpt newtype PollOptId PollOptId :: Int -> PollOptId -- | Story Object data Story Story :: Text -> StoryId -> [Int] -> Int -> UTCTime -> Text -> Text -> Text -> Bool -> Bool -> Story storyBy :: Story -> Text storyId :: Story -> StoryId storyKids :: Story -> [Int] storyScore :: Story -> Int storyTime :: Story -> UTCTime storyTitle :: Story -> Text storyType :: Story -> Text storyUrl :: Story -> Text storyDeleted :: Story -> Bool storyDead :: Story -> Bool -- | ID for a Story newtype StoryId StoryId :: Int -> StoryId -- | User Object data User User :: Maybe Text -> UTCTime -> Int -> UserId -> Int -> [Int] -> Bool -> Bool -> User userAbout :: User -> Maybe Text userCreated :: User -> UTCTime userDelay :: User -> Int userId :: User -> UserId userKarma :: User -> Int userSubmitted :: User -> [Int] userDeleted :: User -> Bool userDead :: User -> Bool -- | User ID for a User Object newtype UserId UserId :: Text -> UserId -- | Types data Job Job :: Text -> JobId -> Int -> Text -> UTCTime -> Text -> Text -> Text -> Bool -> Bool -> Job jobBy :: Job -> Text jobId :: Job -> JobId jobScore :: Job -> Int jobText :: Job -> Text jobTime :: Job -> UTCTime jobTitle :: Job -> Text jobType :: Job -> Text jobUrl :: Job -> Text jobDeleted :: Job -> Bool jobDead :: Job -> Bool -- | ID for a Job type newtype JobId JobId :: Int -> JobId -- | Update Object data Update Update :: [Int] -> [Text] -> Bool -> Bool -> Update updateItems :: Update -> [Int] updateProfiles :: Update -> [Text] updateDeleted :: Update -> Bool updateDead :: Update -> Bool -- | Max Item Int data MaxItem -- | TopStories List data TopStories