aboutsummaryrefslogtreecommitdiff
path: root/shared/src/commonMain
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2021-12-04 00:31:15 -0600
committerIván Ávalos <avalos@disroot.org>2021-12-04 00:31:15 -0600
commitde0b038253e064187493ad132a1a7c94e64b1ee8 (patch)
tree88137b38268d9b40b26bb4966283f388983271f0 /shared/src/commonMain
parent1e47162c01f4f2788304509bcbb9c2f605bc93f7 (diff)
downloadetbsa-trackermap-mobile-de0b038253e064187493ad132a1a7c94e64b1ee8.tar.gz
etbsa-trackermap-mobile-de0b038253e064187493ad132a1a7c94e64b1ee8.tar.bz2
etbsa-trackermap-mobile-de0b038253e064187493ad132a1a7c94e64b1ee8.zip
Removed unneeded files and made API functions suspending
Diffstat (limited to 'shared/src/commonMain')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ResponseExtensions.kt23
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Serializer.kt18
2 files changed, 0 insertions, 41 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ResponseExtensions.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ResponseExtensions.kt
deleted file mode 100644
index 61debbd..0000000
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ResponseExtensions.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package mx.trackermap.TrackerMap.client.infrastructure
-
-import okhttp3.Response
-
-/**
- * Provides an extension to evaluation whether the response is a 1xx code
- */
-val Response.isInformational: Boolean get() = this.code in 100..199
-
-/**
- * Provides an extension to evaluation whether the response is a 3xx code
- */
-val Response.isRedirect: Boolean get() = this.code in 300..399
-
-/**
- * Provides an extension to evaluation whether the response is a 4xx code
- */
-val Response.isClientError: Boolean get() = this.code in 400..499
-
-/**
- * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code
- */
-val Response.isServerError: Boolean get() = this.code in 500..999 \ No newline at end of file
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Serializer.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Serializer.kt
deleted file mode 100644
index 9caf24f..0000000
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Serializer.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package mx.trackermap.TrackerMap.client.infrastructure
-
-import com.squareup.moshi.Moshi
-import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
-import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
-import mx.trackermap.TrackerMap.client.infrastructure.LocalDateAdapter
-import mx.trackermap.TrackerMap.client.infrastructure.LocalDateTimeAdapter
-import java.util.Date
-
-object Serializer {
- @JvmStatic
- val moshi: Moshi = Moshi.Builder()
- .add(KotlinJsonAdapterFactory())
- .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
- .add(LocalDateTimeAdapter())
- .add(LocalDateAdapter())
- .build()
-} \ No newline at end of file