All Projects β†’ dmjio β†’ hackernews

dmjio / hackernews

Licence: MIT license
πŸ“° HackerNews API

Programming Languages

haskell
3896 projects
Nix
1067 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to hackernews

Punchclock
Make sure your asynchronous operations show up to work on time
Stars: ✭ 235 (+487.5%)
Mutual labels:  http-client
line-bot-sdk
πŸ₯ Haskell向けLINE Messaging API SDK
Stars: ✭ 31 (-22.5%)
Mutual labels:  servant
EthernetWebServer SSL
Simple TLS/SSL Ethernet WebServer, HTTP Client and WebSocket Client library for for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52 and RASPBERRY_PI_PICO boards using Ethernet shields W5100, W5200, W5500, ENC28J60 or Teensy 4.1 NativeEthernet/QNEthernet. It now supports Ethernet TLS/SSL Client. The library supports …
Stars: ✭ 40 (+0%)
Mutual labels:  http-client
Elastic
An Elasticsearch REST API client for Rust
Stars: ✭ 248 (+520%)
Mutual labels:  http-client
Axios
Promise based HTTP client for the browser and node.js
Stars: ✭ 89,857 (+224542.5%)
Mutual labels:  http-client
servant-static-th
Embed a directory of static files in your application and serve them from your Servant server
Stars: ✭ 14 (-65%)
Mutual labels:  servant
Http Client
[Deprecated] Event-driven, streaming HTTP client for ReactPHP.
Stars: ✭ 228 (+470%)
Mutual labels:  http-client
http
ponylang HTTP client library 🐴 πŸ•ΈοΈ
Stars: ✭ 38 (-5%)
Mutual labels:  http-client
haskell-realworld-example
A Haskell implementation of realworld.io
Stars: ✭ 39 (-2.5%)
Mutual labels:  servant
cpphttpstack
c++ api for http client & server
Stars: ✭ 30 (-25%)
Mutual labels:  http-client
Csaguzzlebundle
A bundle integrating Guzzle >=4.0 in Symfony
Stars: ✭ 248 (+520%)
Mutual labels:  http-client
Httpie
As easy as /aitch-tee-tee-pie/ πŸ₯§ Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+132530%)
Mutual labels:  http-client
servant-beam-realworld-example-app
Exemplary fullstack Medium.com clone powered by Servant and Beam
Stars: ✭ 33 (-17.5%)
Mutual labels:  servant
Urllib3
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more.
Stars: ✭ 2,857 (+7042.5%)
Mutual labels:  http-client
typesense-dart
Dart client for Typesense
Stars: ✭ 50 (+25%)
Mutual labels:  http-client
Avhttp
avhttp is concurrent http downloader
Stars: ✭ 232 (+480%)
Mutual labels:  http-client
servant-starter-app
A template to get started with servant, postgresql-simple and cookie authentication
Stars: ✭ 17 (-57.5%)
Mutual labels:  servant
pawn-requests
pawn-requests provides an API for interacting with HTTP(S) JSON APIs.
Stars: ✭ 56 (+40%)
Mutual labels:  http-client
Rump
REST client for Java that allows for easy configuration and default values. Allows for quick request construction and a huge range of modifications by using response/request interceptors, adjusting default values related to HTTP requests and creating custom instances for when you need multiple API connection setups.
Stars: ✭ 55 (+37.5%)
Mutual labels:  http-client
haskell-tic-tac-toe
A multiplayer web real-time implementation of the famous Tic Tac Toe game in Haskell.
Stars: ✭ 51 (+27.5%)
Mutual labels:  servant

hackernews

Hackage Hackage Dependencies Haskell Programming Language MIT License Build Status

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:

cabal install --ghcjs

Tests

cabal configure && cabal test
HackerNews API tests
  should round trip Updates JSON
  should round trip Item JSON
  should round trip User JSON
  should retrieve item
  should retrieve user
  should retrieve max item
  should retrieve top stories
  should retrieve new stories
  should retrieve best stories
  should retrieve ask stories
  should retrieve show stories
  should retrieve job stories
  should retrieve updates

  Finished in 1.2129 seconds
  13 examples, 0 failures

Usage

module Main where

import Network.HTTP.Client
import Network.HTTP.Client.TLS

import Web.HackerNews

main :: IO ()
main = do
 mgr <- newManager tlsManagerSettings
 print =<< getItem mgr (ItemId 1000)
 print =<< getUser mgr (UserId "dmjio")
 print =<< getMaxItem mgr
 print =<< getTopStories mgr
 print =<< getNewStories mgr
 print =<< getBestStories mgr
 print =<< getAskStories mgr
 print =<< getShowStories mgr
 print =<< getJobStories mgr
 print =<< getUpdates mgr
Right ( Item {
	 itemId = Just (ItemId 1000)
   , itemDeleted = Nothing
   , itemType = Story
   , itemBy = Just (UserName "python_kiss")
   , itemTime = Just (Time 1172394646)
   , itemText = Nothing
   , itemDead = Nothing
   , itemParent = Nothing
   , itemKids = Nothing
   , itemURL = Just (URL "http://www.netbusinessblog.com/2007/02/19/how-important-is-the-dot-com/")
   , itemScore = Just (Score 4)
   , itemTitle = Just (Title "How Important is the .com TLD?")
   , itemParts = Nothing
   , itemDescendants = Just (Descendants 0)
   })
Right (User {userId = UserId "dmjio"
		   , userDelay = Nothing
		   , userCreated = Created 1375807763
		   , userKarma = Karma 7
		   , userAbout = Nothing
		   , userSubmitted = Just (Submitted [11966297,9355613, ...])
		   })
Right (MaxItem 12695220)
Right (TopStories [12694004,12692190,12691597,...])
Right (NewStories [12695214,12695213,12695195,...])
Right (BestStories [12649414,12637126,12684980, ...])
Right (AskStories [12694706,12694401,12694038, ...])
Right (ShowStories [12694004,12692190,12695037, ...])
Right (JobStories [12693320,12691627,12690539,...])
Right (Updates { items = [12694916,12694478,12693674,..],
				 profiles = [UserName "stefano", UserName "chillydawg", ...]
			   })
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].