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
Change log CHANGELOG.md
Dependencies base (>=4.8 && <4.10), servant (>=0.8 && <0.12), 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 May 25 00:44:32 UTC 2017 by fozworth
Distributions LTSHaskell:0.4.3, NixOS:0.4.3, Tumbleweed:0.4.3
Downloads 618 total (19 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-05-25 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for lackey-0.4.3

[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.