Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package libs

    Contains various APIs that are useful while developing web applications.

    Contains various APIs that are useful while developing web applications.

    Definition Classes
    api
  • package concurrent
    Definition Classes
    libs
  • package crypto
    Definition Classes
    libs
  • package functional
    Definition Classes
    libs
  • package jcache
    Definition Classes
    libs
  • package json

    Json API

    Json API

    For example:

    import play.api.libs.json._
    import play.api.libs.functional.syntax._
    
    case class User(id: Long, name: String, friends: Seq[User] = Seq.empty)
    object User {
    
      // In this format, an undefined friends property is mapped to an empty list
      implicit val format: Format[User] = (
        (__ \ "id").format[Long] and
        (__ \ "name").format[String] and
        (__ \ "friends").lazyFormatNullable(implicitly[Format[Seq[User]]])
          .inmap[Seq[User]](_ getOrElse Seq.empty, Some(_))
      )(User.apply, unlift(User.unapply))
    }
    
    object MyController extends play.api.mvc.Controller {
       def displayUserAsJson(id: String) = Action {
          Ok(Json.toJson(User(id.toLong, "myName")))
       }
    
       def saveUser(jsonString: String)= Action {
         val user = Json.parse(jsonString).as[User]
         //myDataStore.save(user)
         Ok
       }
    }
    Definition Classes
    libs
  • package logback
    Definition Classes
    libs
  • package openid
    Definition Classes
    libs
  • package streams
    Definition Classes
    libs
  • package typedmap
    Definition Classes
    libs
  • package ws

    Provides implicit type classes when you import the package.

    Provides implicit type classes when you import the package.

    Definition Classes
    libs
  • package ahc
  • WSBodyReadables
  • WSBodyWritables
  • WSClient
  • WSRequest
  • WSResponse

package ws

Provides implicit type classes when you import the package.

Source
package.scala
Linear Supertypes
WSBodyWritables, XMLBodyWritables, JsonBodyWritables, DefaultBodyWritables, WSBodyReadables, XMLBodyReadables, JsonBodyReadables, DefaultBodyReadables, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ws
  2. WSBodyWritables
  3. XMLBodyWritables
  4. JsonBodyWritables
  5. DefaultBodyWritables
  6. WSBodyReadables
  7. XMLBodyReadables
  8. JsonBodyReadables
  9. DefaultBodyReadables
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package ahc

Type Members

  1. trait WSBodyReadables extends DefaultBodyReadables with JsonBodyReadables with XMLBodyReadables

    JSON, XML and Multipart Form Data Readables used for Play-WS bodies.

  2. trait WSBodyWritables extends DefaultBodyWritables with JsonBodyWritables with XMLBodyWritables

    JSON, XML and Multipart Form Data Writables used for Play-WS bodies.

  3. trait WSClient extends Closeable

    A Play specific WS client that can use Play specific classes in the request and response building.

    A Play specific WS client that can use Play specific classes in the request and response building.

    Typically, access this class through dependency injection, i.e.

    class MyService @Inject()(ws: WSClient) {
      val response: Future[WSResponse] = ws.url("http://example.com").get()
    }

    Please see the documentation at https://www.playframework.com/documentation/latest/ScalaWS for more details.

  4. trait WSRequest extends StandaloneWSRequest with WSBodyWritables

    A WS Request builder.

  5. trait WSResponse extends StandaloneWSResponse with WSBodyReadables

    A WS Response that can use Play specific classes.

Value Members

  1. def body(objectMapper: ObjectMapper): BodyWritable[JsonNode]
    Definition Classes
    JsonBodyWritables
  2. implicit val bodyWritableOf_Multipart: BodyWritable[Source[Part[Source[ByteString, _]], _]]
    Definition Classes
    WSBodyWritables
  3. implicit val readableAsByteArray: BodyReadable[Array[Byte]]
    Definition Classes
    DefaultBodyReadables
  4. implicit val readableAsByteBuffer: BodyReadable[ByteBuffer]
    Definition Classes
    DefaultBodyReadables
  5. implicit val readableAsByteString: BodyReadable[ByteString]
    Definition Classes
    DefaultBodyReadables
  6. implicit val readableAsJson: BodyReadable[JsValue]
    Definition Classes
    JsonBodyReadables
  7. implicit val readableAsSource: BodyReadable[Source[ByteString, _]]
    Definition Classes
    DefaultBodyReadables
  8. implicit val readableAsString: BodyReadable[String]
    Definition Classes
    DefaultBodyReadables
  9. implicit val readableAsXml: BodyReadable[Elem]
    Definition Classes
    XMLBodyReadables
  10. implicit val writableOf_File: BodyWritable[File]
    Definition Classes
    DefaultBodyWritables
  11. implicit val writableOf_InputStream: BodyWritable[Supplier[InputStream]]
    Definition Classes
    DefaultBodyWritables
  12. implicit val writableOf_Source: BodyWritable[Source[ByteString, _]]
    Definition Classes
    DefaultBodyWritables
  13. implicit val writeableOf_ByteArray: BodyWritable[Array[Byte]]
    Definition Classes
    DefaultBodyWritables
  14. implicit val writeableOf_ByteBuffer: BodyWritable[ByteBuffer]
    Definition Classes
    DefaultBodyWritables
  15. implicit val writeableOf_Bytes: BodyWritable[ByteString]
    Definition Classes
    DefaultBodyWritables
  16. implicit val writeableOf_Document: BodyWritable[Document]
    Definition Classes
    XMLBodyWritables
  17. implicit val writeableOf_JsValue: BodyWritable[JsValue]
    Definition Classes
    JsonBodyWritables
  18. implicit val writeableOf_NodeBuffer: BodyWritable[NodeBuffer]
    Definition Classes
    XMLBodyWritables
  19. implicit def writeableOf_NodeSeq[C <: NodeSeq]: BodyWritable[C]
    Definition Classes
    XMLBodyWritables
  20. implicit val writeableOf_String: BodyWritable[String]
    Definition Classes
    DefaultBodyWritables
  21. implicit val writeableOf_StringBuilder: BodyWritable[StringBuilder]
    Definition Classes
    DefaultBodyWritables
  22. implicit val writeableOf_WsBody: BodyWritable[WSBody]
    Definition Classes
    DefaultBodyWritables
  23. implicit val writeableOf_urlEncodedForm: BodyWritable[Map[String, Seq[String]]]
    Definition Classes
    DefaultBodyWritables
  24. implicit val writeableOf_urlEncodedSimpleForm: BodyWritable[Map[String, String]]
    Definition Classes
    DefaultBodyWritables
  25. object WSBodyReadables extends WSBodyReadables
  26. object WSBodyWritables extends WSBodyWritables

Inherited from WSBodyWritables

Inherited from XMLBodyWritables

Inherited from JsonBodyWritables

Inherited from DefaultBodyWritables

Inherited from WSBodyReadables

Inherited from XMLBodyReadables

Inherited from JsonBodyReadables

Inherited from DefaultBodyReadables

Inherited from AnyRef

Inherited from Any

Ungrouped