class RedoxClient extends AnyRef
Created by apatzer on 3/20/17.
- Alphabetic
- By Inheritance
- RedoxClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RedoxClient(conf: Config, system: ActorSystem, materializer: ActorMaterializer, reducer: (JsValue) ⇒ JsValue = _.reduceNullSubtrees)
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
authorize(): Future[AuthInfo]
Authorize to Redox, returning a Future containing the access and refresh tokens.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T, U](query: T)(implicit writes: Writes[T], reads: Reads[U]): Future[RedoxResponse[U]]
Send a query/read-request of type 'T' expecting a response of type 'U' Ex.
Send a query/read-request of type 'T' expecting a response of type 'U' Ex. get[PatientQuery => case ClinicalSummary](query)
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val materializer: ActorMaterializer
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
post[T, U](data: T)(implicit writes: Writes[T], reads: Reads[U]): Future[RedoxResponse[U]]
Send a post/write-request of type 'T' expecting a response of type 'U' Ex.
Send a post/write-request of type 'T' expecting a response of type 'U' Ex. post[ClinicalSummary => case EmptyResponse](data)
-
def
refresh(auth: AuthInfo): Future[AuthInfo]
Refresh the access and refresh tokens.
-
def
scheduleRefresh(auth: AuthInfo): Unit
Refresh the auth token a minute before it expires.
Refresh the auth token a minute before it expires. Set and schedule a new refresh to occur. NOTE: If this method is overridden, scheduling and storing the new auth token will not be available to the implementing class.
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- implicit val system: ActorSystem
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
upload(file: File, fileContentType: String = "text/plain", contentLength: Long = 2097000L): Future[RedoxResponse[Upload]]
Uploads a file to the Redox /uploads endpoint.
Uploads a file to the Redox /uploads endpoint. Provides sensible defaults for file content type and content length.
- file
The file to upload to Redox.
- fileContentType
The content type of the file (used when converting the file to a source stream. Defaults to 'text/plain'.
- contentLength
The length that will be used to set the 'content-length' on the request. Provides a default value of of ~2MB (2,097,000 octets). This is needed as when we provide a Source we have to manually set the length or the backend http client will chunk the request. (src: play.api.libs.ws.ahc.StandaloneAhcWSRequest#buildRequest() line: 303).
- returns
A future containing the redox upload response.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )