Skip to content

Commit

Permalink
Merge pull request #47 from jansoren/master
Browse files Browse the repository at this point in the history
Added category in CoinGeckoApiClient.getMarkets call
  • Loading branch information
Philipinho authored Feb 2, 2024
2 parents 54af596 + 7885591 commit 0d08f9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Map<String, Map<String, Double>> getTokenPrice(String id, String contractAddress

List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage);

List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String category, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage);

CoinFullData getCoinById(String id);

CoinFullData getCoinById(String id, boolean localization, boolean tickers, boolean marketData, boolean communityData, boolean developerData, boolean sparkline);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Call<Map<String,Map<String, Double>>> getTokenPrice(@Path("id") String id, @Quer

@GET("coins/markets")
Call<List<CoinMarkets>> getCoinMarkets(@Query("vs_currency") String vsCurrency, @Query("ids") String ids,
@Query("category") String category,
@Query("order") String order, @Query("per_page") Integer perPage,
@Query("page") Integer page, @Query("sparkline") boolean sparkline,
@Query("price_change_percentage") String priceChangePercentage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ public List<CoinMarkets> getCoinMarkets(String vsCurrency) {

@Override
public List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage) {
return coinGeckoApi.executeSync(coinGeckoApiService.getCoinMarkets(vsCurrency,ids,order,perPage,page,sparkline,priceChangePercentage));
return getCoinMarkets(vsCurrency,ids,null,order,perPage,page,sparkline,priceChangePercentage);
}

@Override
public List<CoinMarkets> getCoinMarkets(String vsCurrency, String ids, String category, String order, Integer perPage, Integer page, boolean sparkline, String priceChangePercentage) {
return coinGeckoApi.executeSync(coinGeckoApiService.getCoinMarkets(vsCurrency,ids,category,order,perPage,page,sparkline,priceChangePercentage));
}

@Override
Expand Down

0 comments on commit 0d08f9f

Please sign in to comment.