package com.fusi24.rfid.data.api;

import com.fusi24.rfid.config.Constant;
import com.fusi24.rfid.data.entity.DataEntryPermit;
import com.fusi24.rfid.data.entity.DataResultRfid;
import com.fusi24.rfid.data.entity.DataSite;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface RestService {

    @GET(Constant.BEATS2_ENDPOINT + "/api/location")
    Call<List<DataSite>> getDataSite(@Query("filter[type.id]") Integer typeId);

    @GET(Constant.SID2_ENDPOINT + "/api/entryPermit")
    Call<List<DataEntryPermit>> getEntryPermit();

    @GET(Constant.SID2_ENDPOINT + Constant.RFID_ENDPOINT + "/permit/check/{number_rfid}")
    Observable<DataResultRfid> checkRfidCard(@Path("number_rfid") String numberRfid,
                                             @Query("siteId") Integer siteId,
                                             @Query("entryPermitId") Integer permitId,
                                             @Query("expand") String[] expand);

}
