Hal

play.api.hal.Hal
object Hal

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Hal.type

Members list

Type members

Classlikes

final implicit class HalLinkToResource(val link: HalLink) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final implicit class HalResourceToJson(val hal: HalResource) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
implicit class HalStateToResource[T](val link: T)(implicit evidence$1: Writes[T])

Attributes

Supertypes
class Object
trait Matchable
class Any
final implicit class JsonToResource(val jsValue: JsValue) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def embedded(name: String, embeds: HalResource*): HalResource

A HAL resource with at least one embedded resource

A HAL resource with at least one embedded resource

Value parameters

embeds

resources to be embedded

name

type of the resources

Attributes

def hal[T : Writes](content: T, links: Vector[HalLink], embedded: Vector[(String, Vector[HalResource])]): HalResource

Construct a fully featured HAL resource by providing all of it components

Construct a fully featured HAL resource by providing all of it components

Value parameters

content

state of the resource

embedded

embedded HAL resources

links

links to resources

Attributes

def linksSeq(links: Seq[HalLink]): HalResource

A HAL resource containing only links

A HAL resource containing only links

Value parameters

links

links to be contained in the resource

Attributes

def state[T : Writes](content: T): HalResource

A minimal HAL resource with only state and without links / embedded resources

A minimal HAL resource with only state and without links / embedded resources

Type parameters

T

something which can be converted to JSON

Value parameters

content

content representing the state

Attributes

Implicits

Implicits

final implicit def HalLinkToResource(link: HalLink): HalLinkToResource
final implicit def HalResourceToJson(hal: HalResource): HalResourceToJson
final implicit def HalStateToResource[T : Writes](link: T): HalStateToResource[T]
final implicit def JsonToResource(jsValue: JsValue): JsonToResource