package de.tsschulz.tt_tagebuch.shared.api

import de.tsschulz.tt_tagebuch.shared.api.http.AuthedHttpClient
import de.tsschulz.tt_tagebuch.shared.api.models.SeasonDto
import io.ktor.client.call.body
import io.ktor.client.request.get

class SeasonsApi(
    private val client: AuthedHttpClient,
) {
    suspend fun listSeasons(): List<SeasonDto> {
        return client.http.get("/api/seasons").body()
    }

    suspend fun getCurrentSeason(): SeasonDto {
        return client.http.get("/api/seasons/current").body()
    }
}
