Generate Ruby clients from Servant APIs.

Version on this page:0.4.2
LTS Haskell 8.20:0.4.3
Stackage Nightly 2017-06-23:0.4.3
Latest on Hackage:0.4.3
MIT licensed
Maintained by Taylor Fausak

Module documentation for 0.4.2


Version badge Build badge

Lackey is a Haskell library for generating Ruby consumers of Servant APIs.

Use Lackey.rubyForAPI to generate a string of Ruby source code for consuming a Servant API. For example:

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}

import qualified Data.Proxy as Proxy
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import qualified Lackey
import Servant.API

type API = "words" :> Get '[JSON] [String]

api :: Proxy.Proxy API
api = Proxy.Proxy

ruby :: Text.Text
ruby = Lackey.rubyForAPI api

main :: IO ()
main = Text.putStrLn ruby
-- def get_words(excon)excon.request(:method=>:get,:path=>"/words",:headers=>{},:body=>nil)end

The generated functions require Excon.


Change log

Lackey uses Semantic Versioning. The change log is available through the releases on GitHub.

comments powered byDisqus