mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Add list food recycle view
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.capstone.foodify.API;
|
||||
|
||||
import com.capstone.foodify.Model.Food.Food;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
import retrofit2.http.GET;
|
||||
|
||||
|
||||
public interface FoodApi {
|
||||
|
||||
Gson gson = new GsonBuilder().setDateFormat("HH:mm:ss dd-MM-yyyy").create();
|
||||
|
||||
FoodApi apiService = new Retrofit.Builder()
|
||||
.baseUrl("https://free-food-menus-api-production.up.railway.app/").addConverterFactory(GsonConverterFactory.create(gson))
|
||||
.build()
|
||||
.create(FoodApi.class);
|
||||
|
||||
@GET("best-foods")
|
||||
Call<List<Food>> bestFoodResponse();
|
||||
|
||||
@GET("drinks")
|
||||
Call<List<Food>> drinksFoodResponse();
|
||||
}
|
||||
Reference in New Issue
Block a user