package de.tsschulz.tt_tagebuch.shared.api

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

class CalendarHolidayApi(
    private val client: AuthedHttpClient,
) {
    suspend fun getClubHolidays(clubId: Int, year: Int): ClubCalendarHolidaysEnvelope =
        client.http.get("/api/calendar/club/$clubId/holidays") {
            parameter("year", year)
        }.body()
}
