lackey

Generate Ruby clients from Servant APIs.

https://github.com/tfausak/lackey#readme

Version on this page:2.0.0.7
LTS Haskell 23.0:2.0.0.8
Stackage Nightly 2024-12-12:2.0.0.8
Latest on Hackage:2.0.0.8

See all snapshots lackey appears in

MIT licensed
Maintained by Taylor Fausak
This version can be pinned in stack with:lackey-2.0.0.7@sha256:1f5ab281aeb7c5a79d7e15ad6c025136d94250f70b5b5dfdc3f7228091461eea,1542

Module documentation for 2.0.0.7

Lackey

Workflow Hackage Stackage

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.

Changes

Change log

Lackey follows the Package Versioning Policy. You can find release notes on GitHub.