Trait

endpoints.xhr

Endpoints

Related Doc: package xhr

Permalink

trait Endpoints extends algebra.Endpoints with Urls with Methods with StatusCodes

Partial interpreter for algebra.Endpoints that builds a client issuing requests using XMLHttpRequest.

The interpreter is partially implemented: it returns endpoint invocation results in an abstract Result type, which is yet to be defined by a more specialized interpreter. You can find such interpreters in the “known Endpoints subclasses” list.

Source
Endpoints.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Endpoints
  2. StatusCodes
  3. Methods
  4. Urls
  5. Endpoints
  6. Responses
  7. StatusCodes
  8. Requests
  9. SemigroupalSyntax
  10. PartialInvariantFunctorSyntax
  11. InvariantFunctorSyntax
  12. Methods
  13. Urls
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Endpoint[A, B] extends AnyRef

    Permalink

    A function that takes the information needed to build a request and returns a task yielding the information carried by the response.

  2. implicit class InvariantFunctorSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    InvariantFunctorSyntax
  3. type Method = String

    Permalink
    Definition Classes
    Methods → Methods
  4. implicit class PartialInvariantFunctorSyntax[A, F[_]] extends AnyRef

    Permalink
    Definition Classes
    PartialInvariantFunctorSyntax
  5. trait Path[A] extends Url[A]

    Permalink

    Builds an URL path from an A

    Builds an URL path from an A

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

    Permalink
    Definition Classes
    Urls
  7. trait QueryString[A] extends AnyRef

    Permalink

    Defines how to build a query string from an A

    Defines how to build a query string from an A

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

    Permalink
    Definition Classes
    Urls
  9. trait QueryStringParam[A] extends AnyRef

    Permalink

    Defines how to build a query string parameter value from an A

    Defines how to build a query string parameter value from an A

    Definition Classes
    Urls
  10. trait Request[A] extends AnyRef

    Permalink

    A function that takes the information A and returns an XMLHttpRequest with an optional request entity.

    A function that takes the information A and returns an XMLHttpRequest with an optional request entity. If provided, the request entity must be compatible with the send method of XMLHttpRequest.

  11. type RequestEntity[A] = Function2[A, XMLHttpRequest, Any]

    Permalink

    A function that, given information A and an XMLHttpRequest, returns a request entity.

    A function that, given information A and an XMLHttpRequest, returns a request entity. Also, as a side-effect, the function can set the corresponding Content-Type header on the given XMLHttpRequest.

    Definition Classes
    Endpoints → Requests
  12. type RequestHeaders[A] = Function2[A, XMLHttpRequest, Unit]

    Permalink

    A function that takes the information A and the XMLHttpRequest and sets up some headers on it.

    A function that takes the information A and the XMLHttpRequest and sets up some headers on it.

    Definition Classes
    Endpoints → Requests
  13. type Response[A] = Function1[XMLHttpRequest, Either[Exception, A]]

    Permalink

    Attempts to decode an A from an XMLHttpRequest’s response

    Attempts to decode an A from an XMLHttpRequest’s response

    Definition Classes
    Endpoints → Responses
  14. implicit class ResponseExtensions[A] extends AnyRef

    Permalink
    Definition Classes
    Responses
  15. abstract type Result[A]

    Permalink

    A value that eventually yields an A.

    A value that eventually yields an A.

    Typically, concrete representation of Result will have an instance of MonadError, so that we can perform requests (sequentially and in parallel) and recover errors.

  16. trait Segment[A] extends AnyRef

    Permalink

    Defines how to build a path segment from an A

    Defines how to build a path segment from an A

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

    Permalink
    Definition Classes
    SemigroupalSyntax
  18. type StatusCode = Int

    Permalink
    Definition Classes
    StatusCodes → StatusCodes
  19. trait Url[A] extends AnyRef

    Permalink

    Builds an URL from an A

    Builds an URL from an A

    Definition Classes
    Urls

Abstract Value Members

  1. abstract def endpoint[A, B](request: Request[A], response: Response[B], summary: Documentation, description: Documentation, tags: List[String]): Endpoint[A, B]

    Permalink
    Definition Classes
    Endpoints

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def BadRequest: Int

    Permalink
    Definition Classes
    StatusCodes → StatusCodes
  5. def Delete: String

    Permalink
    Definition Classes
    Methods → Methods
  6. def Get: String

    Permalink
    Definition Classes
    Methods → Methods
  7. def NotFound: Int

    Permalink
    Definition Classes
    StatusCodes → StatusCodes
  8. def OK: Int

    Permalink
    Definition Classes
    StatusCodes → StatusCodes
  9. def Options: String

    Permalink
    Definition Classes
    Methods → Methods
  10. def Patch: String

    Permalink
    Definition Classes
    Methods → Methods
  11. def Post: String

    Permalink
    Definition Classes
    Methods → Methods
  12. def Put: String

    Permalink
    Definition Classes
    Methods → Methods
  13. def Unauthorized: Int

    Permalink
    Definition Classes
    StatusCodes → StatusCodes
  14. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  15. implicit def booleanQueryString: QueryStringParam[Boolean]

    Permalink
    Definition Classes
    Urls
  16. def chainPaths[A, B](first: Path[A], second: Path[B])(implicit tupler: Tupler[A, B]): Path[Out]

    Permalink
    Definition Classes
    Urls → Urls
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]

    Permalink
    Definition Classes
    Urls → Urls
  19. final def delete[UrlP, HeadersP, Out](url: Url[UrlP], headers: RequestHeaders[HeadersP])(implicit tuplerUH: Tupler.Aux[UrlP, HeadersP, Out]): Request[Out]

    Permalink
    Definition Classes
    Requests
  20. implicit def doubleQueryString: QueryStringParam[Double]

    Permalink
    Definition Classes
    Urls
  21. implicit def doubleSegment: Segment[Double]

    Permalink
    Definition Classes
    Urls
  22. implicit def dummyPathToUrl[A](p: Path[A]): Url[A]

    Permalink
    Definition Classes
    Urls
  23. lazy val emptyHeaders: RequestHeaders[Unit]

    Permalink

    Sets up no headers on the given XMLHttpRequest

    Sets up no headers on the given XMLHttpRequest

    Definition Classes
    Endpoints → Requests
  24. lazy val emptyRequest: RequestEntity[Unit]

    Permalink
    Definition Classes
    Endpoints → Requests
  25. def emptyResponse(docs: Documentation): Response[Unit]

    Permalink

    Successfully decodes no information from a response

    Successfully decodes no information from a response

    Definition Classes
    Endpoints → Responses
  26. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  32. def header(name: String, docs: Documentation): RequestHeaders[String]

    Permalink
    Definition Classes
    Endpoints → Requests
  33. implicit def intQueryString: QueryStringParam[Int]

    Permalink
    Definition Classes
    Urls
  34. implicit def intSegment: Segment[Int]

    Permalink
    Definition Classes
    Urls
  35. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  36. implicit def longQueryString: QueryStringParam[Long]

    Permalink
    Definition Classes
    Urls
  37. implicit def longSegment: Segment[Long]

    Permalink
    Definition Classes
    Urls
  38. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. def optHeader(name: String, docs: Documentation): RequestHeaders[Option[String]]

    Permalink
    Definition Classes
    Endpoints → Requests
  42. implicit def optionalQueryStringParam[A](implicit param: QueryStringParam[A]): QueryStringParam[Option[A]]

    Permalink
    Definition Classes
    Urls → Urls
  43. val path: Path[Unit]

    Permalink
    Definition Classes
    Urls
  44. implicit lazy val pathPartialInvariantFunctor: PartialInvariantFunctor[Path]

    Permalink
    Definition Classes
    Urls → Urls
  45. final def performXhr[A, B](request: Request[A], response: Response[B], a: A)(onload: (Either[Exception, B]) ⇒ Unit, onerror: (XMLHttpRequest) ⇒ Unit): Unit

    Permalink
    Attributes
    protected
  46. final def post[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP])(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink
    Definition Classes
    Requests
  47. final def put[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], headers: RequestHeaders[HeadersP])(implicit tuplerUB: Tupler.Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Tupler.Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

    Permalink
    Definition Classes
    Requests
  48. def qs[A](name: String, docs: Documentation)(implicit param: QueryStringParam[A]): QueryString[A]

    Permalink
    Definition Classes
    Urls → Urls
  49. implicit lazy val queryStringParamPartialInvFunctor: PartialInvariantFunctor[QueryStringParam]

    Permalink
    Definition Classes
    Urls → Urls
  50. implicit lazy val queryStringPartialInvFunctor: PartialInvariantFunctor[QueryString]

    Permalink
    Definition Classes
    Urls → Urls
  51. def remainingSegments(name: String, docs: Documentation): Path[String]

    Permalink
    Definition Classes
    Urls → Urls
  52. implicit def repeatedQueryStringParam[A, CC[X] <: Iterable[X]](implicit param: QueryStringParam[A], factory: scala.collection.compat.Factory[A, CC[A]]): QueryStringParam[CC[A]]

    Permalink
    Definition Classes
    Urls → Urls
  53. implicit lazy val reqEntityInvFunctor: InvariantFunctor[RequestEntity]

    Permalink
    Definition Classes
    Endpoints → Requests
  54. implicit lazy val reqHeadersInvFunctor: InvariantFunctor[RequestHeaders]

    Permalink
    Definition Classes
    Endpoints → Requests
  55. implicit lazy val reqHeadersSemigroupal: Semigroupal[RequestHeaders]

    Permalink
    Definition Classes
    Endpoints → Requests
  56. def request[A, B, C, AB, Out](method: Method, url: Url[A], entity: RequestEntity[B], headers: RequestHeaders[C])(implicit tuplerAB: Tupler.Aux[A, B, AB], tuplerABC: Tupler.Aux[AB, C, Out]): Request[Out]

    Permalink
    Definition Classes
    Endpoints → Requests
  57. def segment[A](name: String, docs: Documentation)(implicit s: Segment[A]): Path[A]

    Permalink
    Definition Classes
    Urls → Urls
  58. implicit lazy val segmentPartialInvFunctor: PartialInvariantFunctor[Segment]

    Permalink
    Definition Classes
    Urls → Urls
  59. def staticPathSegment(segment: String): Path[Unit] with Serializable

    Permalink
    Definition Classes
    Urls → Urls
  60. implicit lazy val stringQueryString: QueryStringParam[String]

    Permalink
    Definition Classes
    Urls → Urls
  61. implicit lazy val stringSegment: Segment[String]

    Permalink
    Definition Classes
    Urls → Urls
  62. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  63. def textRequest(docs: Documentation): RequestEntity[String]

    Permalink
    Definition Classes
    Endpoints → Requests
  64. def textResponse(docs: Documentation): Response[String]

    Permalink

    Successfully decodes string information from a response

    Successfully decodes string information from a response

    Definition Classes
    Endpoints → Responses
  65. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  66. implicit lazy val urlPartialInvFunctor: PartialInvariantFunctor[Url]

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

    Permalink
    Definition Classes
    Urls → Urls
  68. implicit def uuidQueryString: QueryStringParam[UUID]

    Permalink
    Definition Classes
    Urls
  69. implicit def uuidSegment: Segment[UUID]

    Permalink
    Definition Classes
    Urls
  70. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  73. def wheneverFound[A](response: Function1[XMLHttpRequest, Either[Exception, A]], notFoundDocs: Documentation): Function1[XMLHttpRequest, Either[Exception, Option[A]]]

    Permalink

    A response decoder that maps HTTP responses having status code 404 to None, or delegates to the given response.

    A response decoder that maps HTTP responses having status code 404 to None, or delegates to the given response.

    Definition Classes
    Endpoints → Responses

Inherited from StatusCodes

Inherited from Methods

Inherited from Urls

Inherited from algebra.Endpoints

Inherited from Responses

Inherited from algebra.StatusCodes

Inherited from Requests

Inherited from algebra.Methods

Inherited from algebra.Urls

Inherited from AnyRef

Inherited from Any

Ungrouped