-- 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.0.1
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 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 -> Comment
commentBy :: Comment -> Text
commentId :: Comment -> CommentId
commentKids :: Comment -> Maybe [Int]
commentParent :: Comment -> Int
commentText :: Comment -> Text
commentTime :: Comment -> UTCTime
commentType :: Comment -> Text
newtype CommentId
CommentId :: Int -> CommentId
-- | Types
data Poll
Poll :: Text -> PollId -> [Int] -> [Int] -> Int -> Text -> UTCTime -> Text -> Text -> 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
newtype PollId
PollId :: Int -> PollId
data PollOpt
PollOpt :: Text -> PollOptId -> Int -> Int -> Text -> UTCTime -> Text -> PollOpt
pollOptBy :: PollOpt -> Text
pollOptId :: PollOpt -> PollOptId
pollOptParent :: PollOpt -> Int
pollOptScore :: PollOpt -> Int
pollOptText :: PollOpt -> Text
pollOptTime :: PollOpt -> UTCTime
pollOptType :: PollOpt -> Text
newtype PollOptId
PollOptId :: Int -> PollOptId
-- | Types
data Story
Story :: Text -> Int -> [Int] -> Int -> UTCTime -> Text -> Text -> Text -> 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
newtype StoryId
StoryId :: Int -> StoryId
-- | Types
data User
User :: Maybe Text -> UTCTime -> Int -> UserId -> Int -> [Int] -> User
userAbout :: User -> Maybe Text
userCreated :: User -> UTCTime
userDelay :: User -> Int
userId :: User -> UserId
userKarma :: User -> Int
userSubmitted :: User -> [Int]
newtype UserId
UserId :: Text -> UserId
-- | Types
data Update
Update :: [Int] -> [Text] -> Update
updateItems :: Update -> [Int]
updateProfiles :: Update -> [Text]
type MaxItem = Int
type TopStories = [Int]