endpoints.algebra

Assets

trait Assets extends Endpoints

Describes endpoints related to static assets (e.g. medias, scripts, stylesheets, etc.)

Source
Assets.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Assets
  2. Endpoints
  3. Responses
  4. Requests
  5. SemigroupalSyntax
  6. InvariantFunctorSyntax
  7. Methods
  8. Urls
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type AssetPath

    The path of the asset

  2. abstract type AssetRequest

    An HTTP request to retrieve an asset

  3. abstract type AssetResponse

    An HTTP response containing an asset

  4. abstract type Endpoint[A, B]

    Information carried by an HTTP endpoint

    Information carried by an HTTP endpoint

    Definition Classes
    Endpoints
  5. implicit class InvariantFunctorSyntax[A, F[_]] extends AnyRef

    Definition Classes
    InvariantFunctorSyntax
  6. abstract type Method

    Definition Classes
    Methods
  7. abstract type Path[A] <: Url[A]

    An URL path carrying an A information

    An URL path carrying an A information

    Definition Classes
    Urls
  8. implicit class PathOps[A] extends AnyRef

    Convenient methods for Paths.

  9. abstract type QueryString[A]

    A query string carrying an A information

    A query string carrying an A information

    Definition Classes
    Urls
  10. implicit class QueryStringOps[A] extends AnyRef

    Provides convenient methods on QueryString.

  11. abstract type QueryStringParam[A]

    A single query string parameter carrying an A information.

    A single query string parameter carrying an A information.

    Definition Classes
    Urls
  12. abstract type Request[A]

    Information carried by a whole request (headers and entity)

    Information carried by a whole request (headers and entity)

    Definition Classes
    Requests
  13. abstract type RequestEntity[A]

    Information carried by request entity

    Information carried by request entity

    Definition Classes
    Requests
  14. abstract type RequestHeaders[A]

    Information carried by requests’ headers

    Information carried by requests’ headers

    Definition Classes
    Requests
  15. abstract type Response[A]

    Information carried by a response

    Information carried by a response

    Definition Classes
    Responses
  16. abstract type Segment[A]

    An URL path segment carrying an A information.

    An URL path segment carrying an A information.

    Definition Classes
    Urls
  17. implicit class SemigroupalSyntax[A, F[_]] extends AnyRef

    Definition Classes
    SemigroupalSyntax
  18. abstract type Url[A]

    An URL carrying an A information

    An URL carrying an A information

    Definition Classes
    Urls

Abstract Value Members

  1. abstract def Delete: Method

    Definition Classes
    Methods
  2. abstract def Get: Method

    Definition Classes
    Methods
  3. abstract def Options: Method

    Definition Classes
    Methods
  4. abstract def Patch: Method

    Definition Classes
    Methods
  5. abstract def Post: Method

    Definition Classes
    Methods
  6. abstract def Put: Method

    Definition Classes
    Methods
  7. abstract def assetSegments(name: String = "", docs: Documentation = None): Path[AssetPath]

    A Path that extracts an AssetPath from all the path segments.

    A Path that extracts an AssetPath from all the path segments.

    Consider the following definition:

    val assets = assetsEndpoint(get(path / "assets" / assetsSegments))

    Then, here is how the following requests are decoded: - /assets/foo => foo - /assets/foo/bar => foo/bar

  8. abstract def assetsEndpoint(url: Url[AssetPath], docs: Documentation = None, notFoundDocs: Documentation = None): Endpoint[AssetRequest, AssetResponse]

    url

    URL description

    docs

    description of a response when asset is found. Required by openapi

    notFoundDocs

    description of a not found asset response. Required by openapi

    returns

    An HTTP endpoint serving assets

  9. abstract def chainPaths[A, B](first: Path[A], second: Path[B])(implicit tupler: Tupler[A, B]): Path[Out]

    Chains the two paths

    Chains the two paths

    Definition Classes
    Urls
  10. abstract def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]

    Concatenates two QueryStrings

    Concatenates two QueryStrings

    Definition Classes
    Urls
  11. abstract def digests: Map[String, String]

    The digests of the assets

  12. abstract def emptyHeaders: RequestHeaders[Unit]

    No particular information.

    No particular information. Does not mean that the headers *have to* be empty. Just that, from a server point of view no information will be extracted from them, and from a client point of view no particular headers will be built in the request.

    Definition Classes
    Requests
  13. abstract def emptyRequest: RequestEntity[Unit]

    Empty request.

    Empty request.

    Definition Classes
    Requests
  14. abstract def emptyResponse(docs: Documentation = None): Response[Unit]

    Empty response.

    Empty response.

    Definition Classes
    Responses
  15. abstract def endpoint[A, B](request: Request[A], response: Response[B], summary: Documentation = None, description: Documentation = None): Endpoint[A, B]

    HTTP endpoint.

    HTTP endpoint.

    request

    Request

    response

    Response

    summary

    optional summary documentation

    description

    optional description documentation

    Definition Classes
    Endpoints
  16. abstract def header(name: String, docs: Documentation = None): RequestHeaders[String]

    Definition Classes
    Requests
  17. implicit abstract def intQueryString: QueryStringParam[Int]

    Ability to define Int query string parameters

    Ability to define Int query string parameters

    Definition Classes
    Urls
  18. implicit abstract def intSegment: Segment[Int]

    Ability to define Int path segments

    Ability to define Int path segments

    Definition Classes
    Urls
  19. implicit abstract def longQueryString: QueryStringParam[Long]

    Query string parameter containing a Long value

    Query string parameter containing a Long value

    Definition Classes
    Urls
  20. implicit abstract def longSegment: Segment[Long]

    Segment containing a Long value

    Segment containing a Long value

    Definition Classes
    Urls
  21. abstract def optHeader(name: String, docs: Documentation = None): RequestHeaders[Option[String]]

    Definition Classes
    Requests
  22. abstract def optQs[A](name: String, docs: Documentation = None)(implicit value: QueryStringParam[A]): QueryString[Option[A]]

    Builds a QueryString with one optional parameter of type A.

    Builds a QueryString with one optional parameter of type A.

    name

    Parameter’s name

    Definition Classes
    Urls
  23. abstract def option[A](response: Response[A], notFoundDocs: Documentation = None): Response[Option[A]]

    Turns a Response[A] into a Response[Option[A]].

    Turns a Response[A] into a Response[Option[A]].

    Concrete interpreters should represent None with an empty HTTP response whose status code is 404 (Not Found).

    Definition Classes
    Responses
  24. abstract def qs[A](name: String, docs: Documentation = None)(implicit value: QueryStringParam[A]): QueryString[A]

    Builds a QueryString with one parameter.

    Builds a QueryString with one parameter.

    A

    Type of the value carried by the parameter

    name

    Parameter’s name

    Definition Classes
    Urls
  25. implicit abstract def reqEntityInvFunctor: InvariantFunctor[RequestEntity]

    Definition Classes
    Requests
  26. implicit abstract def reqHeadersInvFunctor: InvariantFunctor[RequestHeaders]

    Definition Classes
    Requests
  27. implicit abstract def reqHeadersSemigroupal: Semigroupal[RequestHeaders]

    Definition Classes
    Requests
  28. abstract def request[UrlP, BodyP, HeadersP, UrlAndBodyPTupled](method: Method, url: Url[UrlP], entity: RequestEntity[BodyP] = emptyRequest, headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerAB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerABC: Tupler[UrlAndBodyPTupled, HeadersP]): Request[Out]

    Request for given parameters

    Request for given parameters

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

    method

    Request method

    url

    Request URL

    entity

    Request entity

    headers

    Request headers

    Definition Classes
    Requests
  29. abstract def segment[A](name: String = "", docs: Documentation = None)(implicit s: Segment[A]): Path[A]

    Builds a path segment carrying an A information

    Builds a path segment carrying an A information

    Definition Classes
    Urls
  30. abstract def staticPathSegment(segment: String): Path[Unit]

    Builds a static path segment

    Builds a static path segment

    Definition Classes
    Urls
  31. implicit abstract def stringQueryString: QueryStringParam[String]

    Ability to define String query string parameters

    Ability to define String query string parameters

    Definition Classes
    Urls
  32. implicit abstract def stringSegment: Segment[String]

    Ability to define String path segments

    Ability to define String path segments

    Definition Classes
    Urls
  33. abstract def textRequest(docs: Documentation = None): RequestEntity[String]

    Request with string body.

    Request with string body.

    Definition Classes
    Requests
  34. abstract def textResponse(docs: Documentation = None): Response[String]

    Text response.

    Text response.

    Definition Classes
    Responses
  35. implicit abstract def urlInvFunctor: InvariantFunctor[Url]

    Definition Classes
    Urls
  36. abstract def urlWithQueryString[A, B](path: Path[A], qs: QueryString[B])(implicit tupler: Tupler[A, B]): Url[Out]

    Builds an URL from the given path and query string

    Builds an URL from the given path and query string

    Definition Classes
    Urls

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. implicit def dummyPathToUrl[A](p: Path[A]): Url[A]

    Implicit conversion to get rid of intellij errors when defining paths.

    Implicit conversion to get rid of intellij errors when defining paths. Effectively should not be called.

    Definition Classes
    Urls
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def get[UrlP, HeadersP](url: Url[UrlP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerAC: Tupler[UrlP, HeadersP]): Request[Out]

    Helper method to perform GET request

    Helper method to perform GET request

    UrlP

    Payload carried by url

    HeadersP

    Payload carried by headers

    Definition Classes
    Requests
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. val path: Path[Unit]

    An empty path.

    An empty path.

    Useful to begin a path definition:

    path / "foo" / segment[Int] /? qs[String]("bar")
    Definition Classes
    Urls
  20. final def post[UrlP, BodyP, HeadersP, UrlAndBodyPTupled](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP] = emptyHeaders)(implicit tuplerAB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerABC: Tupler[UrlAndBodyPTupled, HeadersP]): Request[Out]

    Helper method to perform POST request

    Helper method to perform POST request

    UrlP

    Payload carried by url

    BodyP

    Payload carried by body

    HeadersP

    Payload carried by headers

    UrlAndBodyPTupled

    Payloads of Url and Body tupled together by Tupler

    Definition Classes
    Requests
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Endpoints

Inherited from Responses

Inherited from Requests

Inherited from Methods

Inherited from Urls

Inherited from AnyRef

Inherited from Any

Ungrouped