package com.fabledsword.minstrel.api.endpoints

import com.fabledsword.minstrel.models.wire.HistoryPageWire
import retrofit2.http.GET
import retrofit2.http.Query

/**
 * Retrofit interface for `/api/me/history`. Mirrors the relevant
 * subset of `flutter_client/lib/api/endpoints/me.dart` (only
 * `history()`; profile / timezone / quarantine endpoints land with
 * their respective phases).
 */
interface HistoryApi {
    @GET("api/me/history")
    suspend fun getHistory(
        @Query("limit") limit: Int = DEFAULT_LIMIT,
        @Query("offset") offset: Int = 0,
    ): HistoryPageWire

    companion object {
        const val DEFAULT_LIMIT: Int = 50
    }
}
