mirror of
https://github.com/InsanusMokrassar/SauceNaoAPI.git
synced 2024-12-23 05:07:12 +00:00
update package
This commit is contained in:
parent
eb9456a233
commit
7bc1e822fc
@ -18,7 +18,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
project.version = "$library_version"
|
project.version = "$library_version"
|
||||||
project.group = "com.insanusmokrassar"
|
project.group = "dev.inmo"
|
||||||
|
|
||||||
apply from: "publish.gradle"
|
apply from: "publish.gradle"
|
||||||
apply from: "github_release.gradle"
|
apply from: "github_release.gradle"
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI
|
|
||||||
|
|
||||||
sealed class OutputType {
|
|
||||||
abstract val typeCode: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
object HtmlOutputType : OutputType() {
|
|
||||||
override val typeCode: Int = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
object XmlOutputType : OutputType() {
|
|
||||||
override val typeCode: Int = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
object JsonOutputType : OutputType() {
|
|
||||||
override val typeCode: Int = 2
|
|
||||||
}
|
|
17
src/commonMain/kotlin/dev/inmo/SauceNaoAPI/OutputType.kt
Normal file
17
src/commonMain/kotlin/dev/inmo/SauceNaoAPI/OutputType.kt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package dev.inmo.SauceNaoAPI
|
||||||
|
|
||||||
|
sealed class OutputType {
|
||||||
|
abstract val typeCode: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
object HtmlOutputType : dev.inmo.SauceNaoAPI.OutputType() {
|
||||||
|
override val typeCode: Int = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
object XmlOutputType : dev.inmo.SauceNaoAPI.OutputType() {
|
||||||
|
override val typeCode: Int = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
object JsonOutputType : dev.inmo.SauceNaoAPI.OutputType() {
|
||||||
|
override val typeCode: Int = 2
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI
|
package dev.inmo.SauceNaoAPI
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.exceptions.TooManyRequestsException
|
import com.insanusmokrassar.SauceNaoAPI.exceptions.TooManyRequestsException
|
||||||
import com.insanusmokrassar.SauceNaoAPI.exceptions.sauceNaoAPIException
|
import com.insanusmokrassar.SauceNaoAPI.exceptions.sauceNaoAPIException
|
||||||
@ -40,7 +40,7 @@ val defaultSauceNaoParser = Json {
|
|||||||
|
|
||||||
data class SauceNaoAPI(
|
data class SauceNaoAPI(
|
||||||
private val apiToken: String? = null,
|
private val apiToken: String? = null,
|
||||||
private val outputType: OutputType = JsonOutputType,
|
private val outputType: dev.inmo.SauceNaoAPI.OutputType = dev.inmo.SauceNaoAPI.JsonOutputType,
|
||||||
private val client: HttpClient = HttpClient(),
|
private val client: HttpClient = HttpClient(),
|
||||||
private val searchUrl: String = SEARCH_URL,
|
private val searchUrl: String = SEARCH_URL,
|
||||||
private val scope: CoroutineScope = CoroutineScope(Dispatchers.Default),
|
private val scope: CoroutineScope = CoroutineScope(Dispatchers.Default),
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI
|
package dev.inmo.SauceNaoAPI
|
||||||
|
|
||||||
import io.ktor.http.ContentType
|
import io.ktor.http.ContentType
|
||||||
import io.ktor.utils.io.core.Input
|
import io.ktor.utils.io.core.Input
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional
|
package dev.inmo.SauceNaoAPI.additional
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.header.ResultMetaInfo
|
import com.insanusmokrassar.SauceNaoAPI.additional.header.ResultMetaInfo
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.header.adapted
|
import com.insanusmokrassar.SauceNaoAPI.additional.header.adapted
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional
|
package dev.inmo.SauceNaoAPI.additional
|
||||||
|
|
||||||
import com.soywiz.klock.TimeSpan
|
import com.soywiz.klock.TimeSpan
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional.header
|
package dev.inmo.SauceNaoAPI.additional.header
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.*
|
import com.insanusmokrassar.SauceNaoAPI.additional.*
|
||||||
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional.header
|
package dev.inmo.SauceNaoAPI.additional.header
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional.header
|
package dev.inmo.SauceNaoAPI.additional.header
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional.header
|
package dev.inmo.SauceNaoAPI.additional.header
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
import com.insanusmokrassar.SauceNaoAPI.models.Header
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional.results
|
package dev.inmo.SauceNaoAPI.additional.results
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.header.IndexInfo
|
import com.insanusmokrassar.SauceNaoAPI.additional.header.IndexInfo
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.header.ResultMetaInfo
|
import com.insanusmokrassar.SauceNaoAPI.additional.header.ResultMetaInfo
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.additional.results
|
package dev.inmo.SauceNaoAPI.additional.results
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.header.IndexInfo
|
import com.insanusmokrassar.SauceNaoAPI.additional.header.IndexInfo
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.exceptions
|
package dev.inmo.SauceNaoAPI.exceptions
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.defaultSauceNaoParser
|
import com.insanusmokrassar.SauceNaoAPI.defaultSauceNaoParser
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.utils.CommonMultivariantStringSerializer
|
import com.insanusmokrassar.SauceNaoAPI.utils.CommonMultivariantStringSerializer
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.models
|
package dev.inmo.SauceNaoAPI.models
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.defaultSauceNaoParser
|
import com.insanusmokrassar.SauceNaoAPI.defaultSauceNaoParser
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.utils
|
package dev.inmo.SauceNaoAPI.utils
|
||||||
|
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.Serializer
|
import kotlinx.serialization.Serializer
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.utils
|
package dev.inmo.SauceNaoAPI.utils
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.utils
|
package dev.inmo.SauceNaoAPI.utils
|
||||||
|
|
||||||
import kotlinx.coroutines.supervisorScope
|
import kotlinx.coroutines.supervisorScope
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.utils
|
package dev.inmo.SauceNaoAPI.utils
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
@ -1,4 +1,4 @@
|
|||||||
package com.insanusmokrassar.SauceNaoAPI.utils
|
package dev.inmo.SauceNaoAPI.utils
|
||||||
|
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.LONG_TIME_RECALCULATING_MILLIS
|
||||||
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
import com.insanusmokrassar.SauceNaoAPI.additional.SHORT_TIME_RECALCULATING_MILLIS
|
Loading…
Reference in New Issue
Block a user