The lackey package

[Tags:library, mit, test]

Lackey generates Ruby clients from Servant APIs.


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.4.2
Change log CHANGELOG.md
Dependencies base (>=4.8 && <4.10), servant (>=0.8 && <0.11), servant-foreign (>=0.8 && <0.11), text (==1.2.*) [details]
License MIT
Author
Maintainer Taylor Fausak
Category Web
Home page https://github.com/tfausak/lackey#readme
Bug tracker https://github.com/tfausak/lackey/issues
Source repository head: git clone https://github.com/tfausak/lackey
Uploaded Wed Feb 1 14:19:01 UTC 2017 by fozworth
Distributions LTSHaskell:0.4.2, NixOS:0.4.2, Stackage:0.4.2, Tumbleweed:0.4.2
Downloads 404 total (10 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2017-02-01 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for lackey

Readme for lackey-0.4.2

Lackey

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.