All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.app.moviebase.provider.unogs.Unogs.kt Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package app.moviebase.provider.unogs

import app.moviebase.provider.core.remote.HttpClientFactory
import app.moviebase.provider.core.remote.StreamingLogLevel
import app.moviebase.provider.unogs.api.UnogsApi
import io.ktor.client.*
import io.ktor.client.request.*

class Unogs(
    apiKey: String,
    logLevel: StreamingLogLevel = StreamingLogLevel.NONE
) {

    private val client: HttpClient = HttpClientFactory.build(logLevel) {
        it.header(UnogsUrlParameter.API_KEY, apiKey)
        it.header(UnogsUrlParameter.API_HOST, UnogsWebConfig.HOST)
        it.header(UnogsUrlParameter.USE_QUERY_STRING, true)
    }

    val api = UnogsApi(client)
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy