package com.dreamteam.timelapse.data
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface ApiService {
    @GET("projects")
    fun getProjets(): Call<List<Project>>
    @GET("projects/{id}")
    fun getProjet(@Path("id") projectId: Int): Call<Project>
    @GET("projects/{id}/measurements") // Remplace par l'endpoint de ton API
    fun getMeasurements(@Path("id") projectId: Int): Call<List<Measurement>>
    @GET("videos")
    fun getVideos(): Call<List<VideoDTO>>
    @POST("videos")
    fun createVideo(@Body video: VideoDTO): Call<Confirmation>
    @DELETE("videos/{id}")
    fun deleteVideo(@Path("id") videoId : Int): Call<Void>
    @POST("projects/")
    fun createProject(@Body project: Project): Call<Confirmation>
    @GET("projects/{id}/videos")
    fun getVideosOfProject(@Path("id") projectId:Int): Call<List<VideoDTO>>
    @DELETE("projects/{id}")
    fun deleteProject(@Path("id") projectId:Int) : Call<Void>
    @POST("procedure/start")
    fun procedureStart(@Body captureQuery: CaptureQuery): Call<Void>
    @POST("procedure/stop")
    fun procedureStop(): Call<Void>
}