commonMain.app.moviebase.tmdb.api.TmdbCompaniesApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tmdb-api-jvm Show documentation
Show all versions of tmdb-api-jvm Show documentation
Kotlin Multiplatform library to access the TMDB API.
The newest version!
package app.moviebase.tmdb.api
import app.moviebase.tmdb.model.TmdbCompanyDetail
import app.moviebase.tmdb.core.endPointV3
import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.request.*
class TmdbCompaniesApi internal constructor(private val client: HttpClient) {
suspend fun getDetails(companyId: Int): TmdbCompanyDetail = client.get {
endPointV3("company", companyId.toString())
}.body()
}