class
Rest extends AnyRef
Instance Constructors
-
new
Rest(uriRoot: String, controller: Controller, serialiser: Serialiser, persister: Persister, validator: Validator = ...)
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
def
addGetAll[T <: AnyRef](resourceName: String)(implicit arg0: Manifest[T]): Unit
-
def
addPost[T <: Resource[T]](resourceName: String)(implicit arg0: Manifest[T]): Unit
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
knownErrorsHandler: (Request) ⇒ Future[ResponseBuilder]
-
def
migrate[T <: Resource[T]](idempotentForwardMigration: (T) ⇒ T, backwardsView: (T) ⇒ AnyRef = identity[T], oldResourceName: Option[String] = None)(implicit arg0: ClassTag[T], arg1: Manifest[T]): Either[Failure, Int]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
pathTo(resourceName: String): String
-
def
resource[T <: Resource[T]](supportedMethods: HttpMethod*)(implicit arg0: ClassTag[T], arg1: Manifest[T]): Rest
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Trivial REST: (1) Declare a case class (2) Register it as a Resource, specifying the allowed HTTP methods (3) You get a truly RESTful API, your allowed HTTP methods, and persistence, and caching, for free. (4) -- and a few days later -- when you need to migrate data, simply declare the migration rules
Concepts to explore: Case classes as a schema for JSON Postel's Law / The Robustness Principle - http://en.wikipedia.org/wiki/Robustness_principle Multiple versions of a case class supported at the same time