libstackexchange alternatives and similar packages
Based on the "Networking" category.
Alternatively, view libstackexchange alternatives based on common mentions on social networks and blogs.
-
snap-core
Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers. -
websockets
A Haskell library for creating WebSocket-capable servers -
snap-server
A fast HTTP server library, which runs Snap web handlers. -
discord-haskell
Haskell library for writing Discord bots -
call-haskell-from-anything
Call Haskell functions from any programming language via serialization and dynamic libraries -
PortFusion
Haskell-powered cross-platform transport-layer distributed reverse / forward proxy & tunneling solution – currently available for all TCP protocols (RDP, VNC, HTTP(S), SSH, ...). -
glirc
Haskell IRC library and console client - Join us on libera.chat #glirc -
io-streams
Simple, composable, and easy-to-use stream I/O for Haskell -
network-transport-zeromq
ZeroMQ transport for distributed-process (aka Cloud Haskell) -
HaskellNet
Haskell library which provides client support for POP3, SMTP, and IMAP protocols. -
ngx-export
A comprehensive web framework aimed at building custom Haskell handlers for the Nginx Web Server -
http-streams
Haskell HTTP client library for use with io-streams -
graphula
A simple interface for generating persistent data and linking its dependencies -
http-types
Generic HTTP types for Haskell (for both client and server code) -
secure-sockets
A library for making secure connections between servers. -
network-transport-tcp
TCP Realisation of Network.Transport -
linklater
A Haskell library for the Slack API (including real-time messaging!)
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of libstackexchange or a related project?
README
libstackexchange
Haskell interface to Stack Exchange API v2.1
Getting started
You talk to StackExchange API server via Request
s: quite simple data type
containing server host name, API call path, query parameters and so on. Simple
request would be like that:
request = questions
Yeah, that simple. Next, Request
is a Monoid
. This means you
can easy construct and reuse arbitrarily complex requests:
common = site "stackoverflow" <> key "12345678"
questions' = questions <> common
answers' = answers <> common
To get response from request, you need to send it to Stack Exchange:
response = askSE $ questions'
Authentication
Some API calls require authentication. The main goal is to get access_token
via quite
sophisticated process (serverside authentication skeleton example might be helpful here. To get it to work you
must provide client_id
, redirect_uri
and client_secret
). After that, you can freely call this priviledged API:
response = askSE $ token "12345678" $ me <> key "12345678"
Retrieving Data
StackExchange responses are, basically, wrapped aeson data structure, so you can access data via ordinary aeson parsers:
ghci> :m + Control.Applicative Data.Aeson Data.Aeson.Types Data.Monoid Data.Text
ghci> data Title = Title Text deriving Show
ghci> instance FromJSON Title where parseJSON o = Title <$> (parseJSON o >>= (.: "title"))
ghci> qs <- askSE $ questions <> site "stackoverflow"
ghci> map (fromJSON . unSE) qs :: [Result Title]
[Success (Title "Playing encrypted video"),Success (Title "How do i get a If statment to read a multilined textbox?"), ...]
Another way for experienced users familiar with lens would be aeson-lens package.
For the ease of interaction se
Iso
is provided:
ghci> import qualified Data.Aeson.Lens as L
ghci> qs ^.. traverse . from se . L.key "title" . L.asText
["Playing encrypted video", "How do i get a If statment to read a multilined textbox?", ...]