package kr.co.vividnext.sodalive.audio_content.playlist

import kr.co.vividnext.sodalive.audio_content.playlist.create.CreatePlaylistRequest
import kr.co.vividnext.sodalive.audio_content.playlist.modify.UpdatePlaylistRequest

class AudioContentPlaylistRepository(private val api: PlaylistApi) {
    fun getPlaylistList(token: String) = api.getPlaylistList(authHeader = token)

    fun getPlaylistDetail(
        playlistId: Long,
        token: String
    ) = api.getPlaylistDetail(
        id = playlistId,
        authHeader = token
    )

    fun createPlaylist(
        request: CreatePlaylistRequest,
        token: String
    ) = api.createPlaylist(request, token)

    fun deletePlaylist(
        playlistId: Long,
        token: String
    ) = api.deletePlaylist(
        id = playlistId,
        authHeader = token
    )

    fun updatePlaylist(
        playlistId: Long,
        request: UpdatePlaylistRequest,
        token: String
    ) = api.updatePlaylist(
        id = playlistId,
        request = request,
        authHeader = token
    )
}
