Play’R

Play’R stands for: Playing with Play and ReST.

It’s a simple, uniform, and introspectable way to declare ReST APIs in play.

simple
Just implements some traits and Play’R will do the routing for you.
uniform
Play’R defines an uniform mapping from http methods to controller methods.
introspectable
The declared resources capabilities can be listed and used to generate documentation or ui connectors.
See the PlayR-swagger project as an example.

Features

  • Uses standard Play controllers
  • Map HTTP verbs to controller methods via traits implementation.
  • Resource routing and dependencies defined in Scala
  • Introspection API allowing you to generate content from your defined ReST API

Development

Development is supported by 26lights.

Source and bug tracking are hosted on github: https://github.com/26lights/PlayR

Warning

Play’R is a young project and the API is subject to change.

Usage

To use Play’R in your sbt based project, you should add a resolver for the 26lights public repository:

resolvers += "26Lights releases" at "http://build.26source.org/nexus/content/repositories/public-releases"

and add Play’R to your library dependencies:

libraryDependencies ++= Seq (
  "26lights"  %% "playr"  % "0.4.0"
)

Further reading

If not already done, you should start with the Demo example as a quick introduction.

After that, you can read about Play’R basics and the more complete tutorial.