The lackey package

[ Tags: library, mit, web ] [ Propose Tags ]

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, 0.4.3, 0.4.4, 0.4.5, 0.4.6
Change log CHANGELOG.md
Dependencies base (>=4.8 && <4.11), servant (>=0.8 && <0.13), 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 Thu Nov 9 00:37:19 UTC 2017 by fozworth
Distributions LTSHaskell:0.4.6, NixOS:0.4.6, Stackage:0.4.6, Tumbleweed:0.4.3
Downloads 746 total (109 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-11-09 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for lackey-0.4.6

[back to package description]

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.