package fr.corenting.edcompanion.network.retrofit;

import java.util.List;

import fr.corenting.edcompanion.models.apis.EDApi.CommodityDetailsResponse;
import fr.corenting.edcompanion.models.apis.EDApi.CommodityFinderResponse;
import fr.corenting.edcompanion.models.apis.EDApi.CommodityResponse;
import fr.corenting.edcompanion.models.apis.EDApi.CommunityGoalsResponse;
import fr.corenting.edcompanion.models.apis.EDApi.DistanceResponse;
import fr.corenting.edcompanion.models.apis.EDApi.NewsArticleResponse;
import fr.corenting.edcompanion.models.apis.EDApi.ShipFinderResponse;
import fr.corenting.edcompanion.models.apis.EDApi.ShipResponse;
import fr.corenting.edcompanion.models.apis.EDApi.StationResponse;
import fr.corenting.edcompanion.models.apis.EDApi.SystemHistoryResponse;
import fr.corenting.edcompanion.models.apis.EDApi.SystemResponse;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface EDApiRetrofit {
    @GET("community_goals/")
    Call<List<CommunityGoalsResponse>> getCommunityGoals();

    @GET("galnet/")
    Call<List<NewsArticleResponse>> getGalnetNews(@Query("lang") String language);

    @GET("news/")
    Call<List<NewsArticleResponse>> getNews();

    @GET("distance_calculator/")
    Call<DistanceResponse> getDistance(@Query("firstSystem") String firstSystem,
                                       @Query("secondSystem") String secondSystem);

    @GET("ships/")
    Call<List<ShipResponse>> getShips(@Query("name") String shipName);

    @GET("commodities/")
    Call<List<CommodityResponse>> getCommodities(@Query("name") String filter);

    @GET("commodities/{name}")
    Call<CommodityDetailsResponse> getCommodityDetails(@Path("name") String name);

    @GET("ship_finder/")
    Call<List<ShipFinderResponse>> findShip(@Path("referenceSystem") String system,
                                            @Path("ship") String ship);

    @GET("system/{system}")
    Call<SystemResponse> getSystemDetails(@Path("system") String system);

    @GET("system/{system}/stations")
    Call<List<StationResponse>> getSystemStations(@Path("system") String system);

    @GET("system/{system}/history")
    Call<List<SystemHistoryResponse>> getSystemHistory(@Path("system") String system);

    @GET("commodity_finder/")
    Call<List<CommodityFinderResponse>> findCommodity(@Path("referenceSystem") String system,
                                                      @Path("commodityName") String commodity,
                                                      @Query("pad") String minLandingPad,
                                                      @Query("stock") int stock,
                                                      @Query("demand") int demand,
                                                      @Query("selling") boolean sellingMode);
}

@@ -1824,20 +1824,21 @@
 ndShip(@
-Path
+Query
 (%22refere
@@ -1909,20 +1909,21 @@
        @
-Path
+Query
 (%22ship%22)
@@ -2370,20 +2370,21 @@
 modity(@
-Path
+Query
 (%22refere
@@ -2465,20 +2465,21 @@
        @
-Path
+Query
 (%22commod

fix some ed-api requests