Advertisement
Vassa007

Agriino Endpoint

May 23rd, 2024
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.57 KB | Source Code | 0 0
  1. public interface AreaDetailService {
  2.     @GET("area/{area_id}")
  3.     Call<PlantationAreaData> getDetailArea(@Path("area_id") String area_id, @Query("id") String id, @Query("_token") String token);
  4.  
  5.     @GET("directleaves/nutrients/search")
  6.     Call<PlanDataBundle> getPlanAll(@Query("pln_area") String pln_area, @Query("id") String id, @Query("_token") String token, @Query("skip") int skip, @Query("take") int take);
  7.  
  8.     @POST("directleaves/nutrients")
  9.     @FormUrlEncoded
  10.     Call<Void> storePlan(@Field("id") String id, @Field("_token") String token, @Field("pln_area") String area_id, @Field("pln_activity") String activity, @Field("pln_date") String date, @Field("pln_commodity") String  commodity);
  11.  
  12. }
  13.  
  14. public interface DirectLeavesService {
  15.     @POST("directleaves/nutrientsp")
  16.     @FormUrlEncoded
  17.     Call<SurveyStoreResultData> storeSurvey(@Field("id") String id, @Field("_token") String token, @Field("sur_plan") String plan_id, @Field("sur_lat") String latitude, @Field("sur_long") String longitude, @Field("sur_red") int red, @Field("sur_green") int green, @Field("sur_blue") int blue);
  18.  
  19.     @POST("directleaves/nutrientsp/store_mass")
  20.     @FormUrlEncoded
  21.     Call<Void> storeMass(@Field("id") String id, @Field("_token") String token, @Field("data[]") ArrayList<String> data);
  22.  
  23.     @DELETE("directleaves/nutrientsp/{survey_id}")
  24.     Call<Void> deleteSurvey(@Path("survey_id") String surveyID, @Query("id") String id, @Query("_token") String token);
  25. }
  26.  
  27. public interface EventService {
  28.     @GET("area/{area_id}")
  29.     Call<PlantationAreaData> getDetailEvent(@Path("area_id") String area_id, @Query("id") String id, @Query("_token") String token);
  30.  
  31.     @GET("directleaves/nutrientsp/{plan_id}")
  32.     Call<EventDataBundle> getEventAll(@Path("plan_id") String plan_id, @Query("id") String id, @Query("_token") String token, @Query("skip") int skip, @Query("take") int take);
  33.  
  34.     @POST("directleaves/nutrientsp")
  35.     @FormUrlEncoded
  36.     Call<Void> storeEvent(@Field("id") String id, @Field("_token") String token, @Field("evt_name") String event_name, @Field("evt_date_begin") String date_begin, @Field("evt_date_end") String date_end, @Field("evt_plan") String plan_id);
  37.  
  38.     @GET("directleaves/nutrientsr/0")
  39.     Call<JsonObject> getDSS(@Query("plan") String plan_id, @Query("id") String id, @Query("_token") String token);
  40.  
  41.     @PUT("directleaves/nutrientsr/{plan_id}")
  42.     Call<JsonObject> updateDSS(@Path("plan_id") String plan_id, @Query("id") String id, @Query("_token") String token, @Query("rep_type") String rep_type, @Query("survey") String survey_id);
  43.  
  44.     @POST("directleaves/nutrientsr")
  45.     @FormUrlEncoded
  46.     Call<Void> storeDSSPlant(@Query("id") String id, @Query("_token") String token, @Field("first_step") String first_step, @Field("rep_plan") String plan_id, @Field("rep_type") String type, @Field("rep_fe") int rep_fe, @Field("rep_age") int rep_age, @Field("rep_fr") int rep_fr, @Field("rep_production") int rep_production, @Field("rep_shade") String rep_shade, @Field("rep_dry") int rep_dry, @Field("rep_adjustment") int rep_adjustment);
  47.  
  48.     @POST("directleaves/nutrientsr")
  49.     @FormUrlEncoded
  50.     Call<Void> storeDSSArea(@Query("id") String id, @Query("_token") String token, @Field("first_step") String first_step, @Field("rep_plan") String plan_id, @Field("rep_type") String type, @Field("rep_fe") int rep_fe, @Field("rep_age") int rep_age, @Field("rep_fr") int rep_fr, @Field("rep_shade") String rep_shade, @Field("rep_dry") int rep_dry, @Field("rep_quantity") int rep_quantity, @Field("rep_adjustment") int rep_adjustment);
  51.  
  52.     @DELETE("directleaves/nutrientsr/{id}")
  53.     Call<Void> deleteDSS(@Path("id") String dss_id, @Query("_token") String token, @Query("id") String id);
  54. }
  55.  
  56. public interface PlantationAreaService {
  57.     @GET("area/0")
  58.     Call<PlantationAreaDataBundle> getAllPlantationArea(@Query("id") String id, @Query("_token") String token, @Query("skip") int skip, @Query("take") int take);
  59.  
  60.     @POST("area")
  61.     @FormUrlEncoded
  62.     Call<Void> storePlantationArea(@Field("are_name") String area_name, @Field("are_wide") int area_wide, @Query("id") String id, @Query("_token") String token, @Field("detail")String detail);
  63.  
  64.     @PATCH("area/{area_id}")
  65.     @FormUrlEncoded
  66.     Call<Void> updatePlantationArea(@Path("area_id") String area_id, @Field("are_name") String area_name, @Field("are_wide") float area_wide, @Query("id") String id, @Query("_token") String token, @Field("detail")String detail);
  67.  
  68.     @DELETE("area/{area_id}")
  69.     Call<Void> deletePlantationArea(@Path("area_id") String area_id, @Query("id") String id, @Query("_token") String token);
  70. }
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement