@@ -89,9 +89,19 @@ instance (HasClient a, HasClient b) => HasClient (a :<|> b) where
89 clientWithRoute (Proxy :: Proxy a) req :<|>
89 clientWithRoute (Proxy :: Proxy a) req :<|>
90 clientWithRoute (Proxy :: Proxy b) req
90 clientWithRoute (Proxy :: Proxy b) req
92−-- | TODO docs
92+-- | Singleton type representing a client for an empty API.
93data EmptyAPIClient = EmptyAPIClient
93data EmptyAPIClient = EmptyAPIClient
95+-- | The client for 'EmptyAPI' is simply 'EmptyAPIClient'.
97+-- > type MyAPI = "books" :> Get '[JSON] [Book] -- GET /books
98+-- > :<|> "nothing" :> EmptyAPI
100+-- > myApi :: Proxy MyApi
103+-- > getAllBooks :: ClientM [Book]
104+-- > (getAllBooks :<|> EmptyAPIClient) = client myApi
95instance HasClient EmptyAPI where
105instance HasClient EmptyAPI where
96 type Client EmptyAPI = EmptyAPIClient
106 type Client EmptyAPI = EmptyAPIClient
97 clientWithRoute Proxy _ = EmptyAPIClient
107 clientWithRoute Proxy _ = EmptyAPIClient