hackernews 0.5.0.0 → 0.5.0.1
raw patch · 2 files changed
+73/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +70/−0
- hackernews.cabal +3/−1
+ README.md view
@@ -0,0 +1,70 @@+hackernews +==========+++++++Hacker News API for Haskell++###Documentation+<https://github.com/HackerNews/API>++Now it supports GHCJS and can be used in the browser! Just install it using:+```bash+cabal install --ghcjs --flags=ghcjs+```++###Tests+```bash+cabal configure && cabal test+```++```bash+Hacker News API Tests+ - Retrieves a Story+ - Retrieves a Comment+ - Retrieves a User+ - Retrieves a Poll+ - Retrieves a Pollopt+ - Retrieves Top Stories+ - Retrieves Max Item+ - Retrieves Updates++Finished in 0.0019 seconds+8 examples, 0 failures+```++###Usage+```haskell +module Example where++import Control.Monad (liftM3)+import Web.HackerNews (UserId (..), getUser, hackerNews)++main :: IO ()+main = print =<< hackerNews (liftM3 (,,) one two three)+ where+ one = getUser (UserId "dmjio")+ two = getUser (UserId "dmj")+ three = getUser (UserId "abs")+```++```bash+(Just (User { userAbout = Nothing+ , userCreated = 2013-08-06 16:49:23 UTC+ , userDelay = 0+ , userId = UserId "dmjio"+ , userKarma = 6+ , userSubmitted = [8433827,8429256,8429161,8429069,8374809,8341570,7919268,7825469,7350544,7327291,6495994,6352317,6168527,6168524,6167639]})+ , +Just (User { userAbout = Nothing+ , userCreated = 2007-04-11 05:57:35 UTC+ , userDelay = 0+ , userId = UserId "dmj"+ , userKarma = 1+ , userSubmitted = [11737]+ }),+Nothing)+```
hackernews.cabal view
@@ -1,5 +1,5 @@ name: hackernews-version: 0.5.0.0+version: 0.5.0.1 description: API for news.ycombinator.com license: MIT synopsis: API for Hacker News@@ -9,6 +9,8 @@ category: Web build-type: Simple cabal-version: >=1.10+extra-source-files:+ README.md flag ghcjs description: Tell cabal we're using GHCJS