package kr.co.vividnext.sodalive.audio_content.series

import io.reactivex.rxjava3.core.Single
import kr.co.vividnext.sodalive.audio_content.series.detail.GetSeriesContentListResponse
import kr.co.vividnext.sodalive.audio_content.series.detail.GetSeriesDetailResponse
import kr.co.vividnext.sodalive.common.ApiResponse
import kr.co.vividnext.sodalive.settings.ContentType
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Path
import retrofit2.http.Query

interface SeriesApi {
    @GET("/audio-content/series")
    fun getSeriesList(
        @Query("creatorId") creatorId: Long,
        @Query("sortType") sortType: SeriesListAllViewModel.SeriesSortType,
        @Query("page") page: Int,
        @Query("size") size: Int,
        @Header("Authorization") authHeader: String
    ): Single<ApiResponse<GetSeriesListResponse>>

    @GET("/audio-content/series/{id}")
    fun getSeriesDetail(
        @Path("id") seriesId: Long,
        @Header("Authorization") authHeader: String
    ): Single<ApiResponse<GetSeriesDetailResponse>>

    @GET("/audio-content/series/{id}/content")
    fun getSeriesContentList(
        @Path("id") seriesId: Long,
        @Query("page") page: Int,
        @Query("size") size: Int,
        @Query("sortType") sortType: SeriesListAllViewModel.SeriesSortType,
        @Header("Authorization") authHeader: String
    ): Single<ApiResponse<GetSeriesContentListResponse>>

    @GET("/audio-content/series/recommend")
    fun getRecommendSeriesList(
        @Query("isAdultContentVisible") isAdultContentVisible: Boolean,
        @Query("contentType") contentType: ContentType,
        @Header("Authorization") authHeader: String
    ): Single<ApiResponse<List<GetSeriesListResponse.SeriesListItem>>>
}
