diff options
author | vlad <vlad@driver.xyz> | 2017-10-09 12:49:02 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-10-09 12:49:02 -0700 |
commit | eeeb6d90f1c6882f0b3d765022b114d97e4dba40 (patch) | |
tree | 7fd813bcba7a3e44f5694bfbf0618ea93d64b5f8 /src/main/scala/xyz/driver/pdsuidomain/services/rest | |
parent | 7d8712a62d30b412717e1b730c0ad267cd207aa4 (diff) | |
download | rest-query-0.7.1.tar.gz rest-query-0.7.1.tar.bz2 rest-query-0.7.1.zip |
Getting rid of the FuzzyValues, Name as a string, and conditionv0.7.1
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/rest')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala index 42f32fc..ea719e1 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala @@ -18,6 +18,7 @@ import xyz.driver.pdsuidomain.formats.json.trial.ApiTrial import xyz.driver.pdsuidomain.services.TrialService import spray.json.DefaultJsonProtocol._ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ +import xyz.driver.entities.patient.CancerType import xyz.driver.pdsuidomain.formats.json.sprayformats.export._ class RestTrialService(transport: ServiceTransport, baseUri: Uri)(implicit protected val materializer: Materializer, @@ -37,9 +38,9 @@ class RestTrialService(transport: ServiceTransport, baseUri: Uri)(implicit prote } } - def getTrialWithLabels(trialId: StringId[Trial], disease: String)( + def getTrialWithLabels(trialId: StringId[Trial], cancerType: CancerType)( implicit requestContext: AuthenticatedRequestContext): Future[GetTrialWithLabelsReply] = { - val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, s"/v1/export/trial/$disease/$trialId")) + val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, s"/v1/export/trial/$cancerType/$trialId")) for { response <- transport.sendRequestGetResponse(requestContext)(request) reply <- apiResponse[ExportTrialWithLabels](response) @@ -48,9 +49,9 @@ class RestTrialService(transport: ServiceTransport, baseUri: Uri)(implicit prote } } - def getTrialsWithLabels(disease: String)( + def getTrialsWithLabels(cancerType: CancerType)( implicit requestContext: AuthenticatedRequestContext): Future[GetTrialsWithLabelsReply] = { - val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, s"/v1/export/trial/$disease")) + val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, s"/v1/export/trial/$cancerType")) for { response <- transport.sendRequestGetResponse(requestContext)(request) reply <- apiResponse[Seq[ExportTrialWithLabels]](response) |