collection-json-1.1.0.0: Collection+JSON—Hypermedia Type Tools

Copyright(c) Alex Brandt 2017
LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Data.CollectionJSON

Contents

Description

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

Synopsis

Core Data Types

data Collection Source #

The top-level object for an application/vnd.collection+json resource.

Constructors

Collection 

Fields

data Link Source #

A link to a related resource (not necessarily an application/vnd.collection+json resource).

Constructors

Link 

Fields

data Item Source #

An element in the Collection

Constructors

Item 

Fields

data Query Source #

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}

Constructors

Query 

Fields

newtype Template Source #

A fillable template for creation of a new object in the Collection.

Constructors

Template 

Fields

data Error Source #

Information about latest error that occured when responding to a request.

Constructors

Error 

Fields

data Datum Source #

Contents of a Collection Item.

Constructors

Datum 

Fields

Type Conversion

class FromCollection a where Source #

A type that can be converted from Collection.

Minimal complete definition

fromCollection

class ToCollection a where Source #

A type that can be converted to Collection.

Minimal complete definition

toCollection