diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-12-14 20:09:40 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-12-14 20:09:40 -0600 |
commit | 1606ed48c1b3f39cfa0e45aab22658645a9b4118 (patch) | |
tree | c2487e02a86d7ae89b12bb94d400257ccb2a879f /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt | |
parent | facf751f941a2f85d0ce236c4a61f21e84758199 (diff) | |
download | etbsa-trackermap-mobile-1606ed48c1b3f39cfa0e45aab22658645a9b4118.tar.gz etbsa-trackermap-mobile-1606ed48c1b3f39cfa0e45aab22658645a9b4118.tar.bz2 etbsa-trackermap-mobile-1606ed48c1b3f39cfa0e45aab22658645a9b4118.zip |
Deleted unused API methods
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt index 64ef8ea..ec92526 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt @@ -238,90 +238,4 @@ class ReportsApi(sessionManager: SessionManager) : ApiClient(sessionManager), In ): ByteArray { return reportsStopsGetBase(from, to, deviceId, true) as ByteArray } - - /** - * Fetch a list of ReportSummary within the time period for the Devices or Groups - * At least one _deviceId_ or one _groupId_ must be passed - * @param from in IS0 8601 format. eg. `1963-11-22T18:30:00Z` - * @param to in IS0 8601 format. eg. `1963-11-22T18:30:00Z` - * @param deviceId (optional) - * @param groupId (optional) - * @return kotlin.Array<ReportSummary> - */ - @Suppress("UNCHECKED_CAST") - suspend fun reportsSummaryGet( - from: LocalDateTime, - to: LocalDateTime, - deviceId: Array<Int>? = null, - groupId: Array<Int>? = null - ): Array<ReportSummary> { - val localVariableQuery: MultiValueMap = mapOf( - "deviceId" to toMultiValue(deviceId!!.toList(), "multi"), - "groupId" to toMultiValue(groupId!!.toList(), "multi"), - "from" to listOf("$from"), - "to" to listOf("$to") - ) - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/reports/summary", query = localVariableQuery - ) - val response = request<Array<ReportSummary>>( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Array<ReportSummary> - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException( - (response as ClientError<*>).body as? String ?: "Client error" - ) - ResponseType.ServerError -> throw ServerException( - (response as ServerError<*>).message ?: "Server error" - ) - } - } - - /** - * Fetch a list of ReportTrips within the time period for the Devices or Groups - * At least one _deviceId_ or one _groupId_ must be passed - * @param from in IS0 8601 format. eg. `1963-11-22T18:30:00Z` - * @param to in IS0 8601 format. eg. `1963-11-22T18:30:00Z` - * @param deviceId (optional) - * @param groupId (optional) - * @return kotlin.Array<ReportTrips> - */ - @Suppress("UNCHECKED_CAST") - suspend fun reportsTripsGet( - from: LocalDateTime, - to: LocalDateTime, - deviceId: Array<Int>? = null, - groupId: Array<Int>? = null - ): Array<ReportTrips> { - val localVariableQuery: MultiValueMap = mapOf( - "deviceId" to toMultiValue(deviceId!!.toList(), "multi"), - "groupId" to toMultiValue(groupId!!.toList(), "multi"), - "from" to listOf("$from"), - "to" to listOf("$to") - ) - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/reports/trips", query = localVariableQuery - ) - val response = request<Array<ReportTrips>>( - localVariableConfig - ) - - return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as Array<ReportTrips> - ResponseType.Informational -> TODO() - ResponseType.Redirection -> TODO() - ResponseType.ClientError -> throw ClientException( - (response as ClientError<*>).body as? String ?: "Client error" - ) - ResponseType.ServerError -> throw ServerException( - (response as ServerError<*>).message ?: "Server error" - ) - } - } } |