1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE TemplateHaskell #-}
4{-# LANGUAGE TypeOperators #-}
6import qualified Elm.Derive as Elm
8import Servant.API ((:>), Get, JSON, QueryParam)
9import Servant.Elm (DefineElm (DefineElm), ElmOptions (urlPrefix),
10 Proxy (Proxy), UrlPrefix (Static), defElmImports,
11 defElmOptions, defaultOptions, deriveBoth,
12 generateElmModuleWith)
23 (deriveBoth defaultOptions
24 { Elm.fieldLabelModifier = \ field ->
25 if head field == '_' then
29 , Elm.unwrapUnaryRecords = False
33myElmOpts :: ElmOptions
37 Static "http://api.giphy.com/v1/gifs"
40type GiphyApi = "random" :> QueryParam "api_key" String :> QueryParam "tag" String :> Get '[JSON] Gif
51 [ DefineElm (Proxy :: Proxy Gif)
52 , DefineElm (Proxy :: Proxy GifData)
54 (Proxy :: Proxy GiphyApi)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list