Giải pháp chuyển đổi số trọn gói cho doanh nghiệp Việt
Bổ xung xuống cuối nội dung sau vào interface PSApiService
@Headers({"Authorization:" + Config.API_KEY})
@GET("/api/cars/limit/{limit}/start/{offset}")
Call<ApiResponseGetCarList> getAllCar(@Path("limit") String limit, @Path("offset") String offset);
@FormUrlEncoded
@Headers({"Authorization:" + Config.API_KEY})
@POST("/api_task/car.update_car")
LiveData<ApiResponse<ApiResponseGetCar>> updateCar(
@Query("car_id") String car_id,
@Field("car_name") String car_name,
@Field("car_color") String car_color,
@Field("car_model") String car_model,
@Field("car_description") String car_description
);
@FormUrlEncoded
@Headers({"Authorization:" + Config.API_KEY})
@POST("/api_task/car.insert_car")
LiveData<ApiResponse<ApiResponseGetCar>> insertCar(
@Field("car_name") String car_name,
@Field("car_color") String car_color,
@Field("car_model") String car_model,
@Field("car_description") String car_description
);
@Headers({"Authorization:" + Config.API_KEY, "Content-Type: application/json"})
@GET("api/car/{id}")
LiveData<ApiResponse<ApiResponseGetCar>> getCarById(@Path("id") String id);
@Headers({"Authorization:" + Config.API_KEY, "Content-Type: application/json"})
@POST("/api_task/car.delete_car")
Call<ApiResponseGetDeleteCar> getDeleteCar(
@Query("car_id") String carId
);
Mời anh em vào cào phím nhé. nhớ kiểm tra nguồn điện trước khi cào