trait BaseRESTRequest[RawResponse, NiceResponse] extends Request[RawResponse]
Base trait for all REST requests in AckCord. If you feel an endpoint is missing, and AckCord hasn't added it yet, you can extend this and create your own request. I'd recommend you to extend RESTRequest tough for simplicity.
- RawResponse
The response type of the request
- NiceResponse
A nicer and less raw type of response created from the response.
- Self Type
- BaseRESTRequest[RawResponse, NiceResponse]
- Source
- baseRequestObjs.scala
- Alphabetic
- By Inheritance
- BaseRESTRequest
- Request
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def bodyForLogging: Option[String]
Returns the body of this Request for use in logging.
Returns the body of this Request for use in logging.
- Definition Classes
- Request
- abstract def requestBody: RequestEntity
The body of the request to send.
The body of the request to send.
- Definition Classes
- Request
- abstract def responseDecoder: Decoder[RawResponse]
A decoder to decode the response.
- abstract def route: RequestRoute
The router for this request.
The router for this request.
- Definition Classes
- Request
- abstract def toNiceResponse(response: RawResponse): NiceResponse
Convert the response to a format the cache handler can understand.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def collect[B](f: PartialFunction[RawResponse, B]): Request[B]
Map the result if the function is defined for the response data.
Map the result if the function is defined for the response data.
- Definition Classes
- Request
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extraHeaders: Seq[HttpHeader]
All the extra headers to send with this request.
All the extra headers to send with this request.
- Definition Classes
- Request
- def filter(f: (RawResponse) => Boolean): Request[RawResponse]
Filter the response of sending this request.
Filter the response of sending this request.
- Definition Classes
- Request
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasPermissions(implicit c: CacheSnapshot): Boolean
Check if a client has the needed permissions to execute this request.
Check if a client has the needed permissions to execute this request.
- Definition Classes
- BaseRESTRequest → Request
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- val identifier: UUID
An unique identifier to track this request from creation to answer.
An unique identifier to track this request from creation to answer.
- Definition Classes
- Request
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (RawResponse) => B): Request[B]
Map the result of sending this request.
Map the result of sending this request.
- Definition Classes
- Request
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def parseResponse(entity: ResponseEntity)(implicit system: ActorSystem[Nothing]): Future[RawResponse]
A flow that can be used to parse the responses from this request.
A flow that can be used to parse the responses from this request.
- Definition Classes
- BaseRESTRequest → Request
- def requiredPermissions: Permission
The permissions needed to use this request.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transformResponse[B](f: (ExecutionContext) => (Future[RawResponse]) => Future[B]): Request[B]
Transform the response of this request as a flow.
Transform the response of this request as a flow.
- Definition Classes
- Request
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])