-- 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.2.3.2 module Web.HackerNews -- | HackerNews API request method hackerNews :: (Show a, FromJSON a) => HackerNews a -> IO a -- | Retrieve a Story by StoryId getStory :: StoryId -> HackerNews (Maybe Story) -- | Retrieve a Comment by CommentId getComment :: CommentId -> HackerNews (Maybe Comment) -- | Retrieve a Poll by PollId getPoll :: PollId -> HackerNews (Maybe Poll) -- | Retrieve a PollOpt by PollOptId getPollOpt :: PollOptId -> HackerNews (Maybe PollOpt) -- | Retrieve a User by UserId getUser :: UserId -> HackerNews (Maybe User) -- | Retrieve a Job getJob :: JobId -> HackerNews (Maybe Job) -- | Retrieve the Top Stories on Hacker News getTopStories :: HackerNews (Maybe TopStories) -- | Retrieve the largest ItemId getMaxItem :: HackerNews (Maybe MaxItem) -- | Retrieve the latest updates getUpdates :: HackerNews (Maybe Update) -- | Core Type type HackerNews a = ReaderT Connection IO a -- | Types data Comment Comment :: Text -> CommentId -> Maybe [Int] -> Int -> Text -> UTCTime -> Text -> 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 newtype CommentId CommentId :: Int -> CommentId -- | Types data Poll Poll :: Text -> PollId -> [Int] -> [Int] -> Int -> Text -> UTCTime -> Text -> Text -> 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 newtype PollId PollId :: Int -> PollId data PollOpt PollOpt :: Text -> PollOptId -> Int -> Int -> Text -> UTCTime -> Text -> 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 newtype PollOptId PollOptId :: Int -> PollOptId -- | Types data Story Story :: Text -> Int -> [Int] -> Int -> UTCTime -> Text -> Text -> Text -> Bool -> Story storyBy :: Story -> Text storyId :: Story -> Int storyKids :: Story -> [Int] storyScore :: Story -> Int storyTime :: Story -> UTCTime storyTitle :: Story -> Text storyType :: Story -> Text storyUrl :: Story -> Text storyDeleted :: Story -> Bool newtype StoryId StoryId :: Int -> StoryId -- | Types data User User :: Maybe Text -> UTCTime -> Int -> UserId -> Int -> [Int] -> Bool -> User userAbout :: User -> Maybe Text userCreated :: User -> UTCTime userDelay :: User -> Int userId :: User -> UserId userKarma :: User -> Int userSubmitted :: User -> [Int] userDeleted :: User -> Bool newtype UserId UserId :: Text -> UserId -- | Types data Job Job :: Text -> JobId -> Int -> Text -> UTCTime -> Text -> Text -> Text -> 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 newtype JobId JobId :: Int -> JobId -- | Types data Update Update :: [Int] -> [Text] -> Bool -> Update updateItems :: Update -> [Int] updateProfiles :: Update -> [Text] updateDeleted :: Update -> Bool type MaxItem = Int type TopStories = [Int]