Copyright | (c) Alex Brandt 2017 |
---|---|
License | MIT |
Safe Haskell | None |
Language | Haskell2010 |
A collection of types and instances for application/vnd.collection+json
.
Full documentation for application/vnd.collection+json
can be found at
http://amundsen.com/media-types/collection/.
- data Collection = Collection {}
- data Link = Link {}
- data Item = Item {}
- data Query = Query {}
- newtype Template = Template {}
- data Error = Error {}
- data Datum = Datum {}
- class FromCollection a where
- class ToCollection a where
Core Data Types
data Collection Source #
The top-level object for an application/vnd.collection+json
resource.
A link to a related resource (not necessarily an
application/vnd.collection+json
resource).
An element in the Collection
A template for possible queries related to this Collection
.
A query should correspond to an associated HTTP GET request.
The Query: > Query "http://example.com/search" "search" Nothing (Just Search:) [Datum "search" "" Nothing]
Corresponds with the following URI for an HTTP GET: > http://example.com/search?search={search_terms}
A fillable template for creation of a new object in the Collection
.
Information about latest error that occured when responding to a request.
Contents of a Collection
Item
.
Type Conversion
class FromCollection a where Source #
A type that can be converted from Collection
.
fromCollection :: Collection -> a Source #
class ToCollection a where Source #
A type that can be converted to Collection
.
toCollection :: a -> Collection Source #