package com.kmalbz import io.ktor.client.* import io.ktor.client.request.* /** * Output Service - RDB Client * * This is the feature extraction interface of the Birbnetes system. */ open class OutputServiceRDBClient(val endpoint: String, val client: HttpClient = HttpClient()) { /** * Get all negative decision objects * * @return Array of decision objects */ suspend fun getallnegative( ): List { return client.get>("$endpoint/output/filter/negative") { } } /** * Get positive decision objects * * @return Array of decision objects */ suspend fun getallpositive( ): List { return client.get>("$endpoint/output/filter/positive") { } } /** * Get decision before a date * * @param dateAfter Date of filter * * @return Array of decision objects */ suspend fun getallafter( dateAfter: Date // PATH ): List { return client.get>("$endpoint/output/after/$dateAfter") { } } /** * Get decision before a date * * @param dateBefore Date of filter * * @return Array of decision objects */ suspend fun getallbefore( dateBefore: Date // PATH ): List { return client.get>("$endpoint/output/before/$dateBefore") { } } /** * Get decision by ID * * @param tagID ID of wave file * * @return Decision object */ suspend fun getDecision( tagID: Int // PATH ): OutputObject { return client.get("$endpoint/output/$tagID") { } } }