package eu.project.rapid.rest;

import java.util.List;

import eu.project.rapid.dtos.DeviceDTO;
import eu.project.rapid.dtos.OffloadingTaskDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by Talha on 4/3/2018.
 */

public interface ApiService {

    @GET("devices/")
    Call<List<DeviceDTO>> getAllDevices();

    @POST("devices/update")
    Call<DeviceDTO> updateDevice(@Body DeviceDTO deviceDTO);

    @POST("devices/seller_devices")
    Call<OffloadingTaskDTO> getSellerDevices(@Query("dataSize") double dataSize,
                                             @Body DeviceDTO deviceDTO);

    @POST("tasks/{id}/completed")
    Call<OffloadingTaskDTO> markCompleted(@Path("id") Long id);

}
