mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Init data from API to screen, fix some UI
This commit is contained in:
@@ -2,6 +2,7 @@ package com.capstone.foodify.API;
|
||||
|
||||
import com.capstone.foodify.Model.Category.Category;
|
||||
import com.capstone.foodify.Model.Food.Food;
|
||||
import com.capstone.foodify.Model.Food.ImageFood;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
@@ -33,12 +34,18 @@ public interface FoodApi {
|
||||
@GET("listFood")
|
||||
Call<List<Food>> listFood(@Query("search") String search, @Query("page") int page, @Query("limit") int limit);
|
||||
|
||||
@GET("listFood")
|
||||
Call<List<Food>> listFood(@Query("page") int page, @Query("limit") int limit);
|
||||
|
||||
@GET("Category")
|
||||
Call<List<Category>> listCategory();
|
||||
|
||||
@GET("Category/{id}/food")
|
||||
Call<List<Food>> listFoodByCategory(@Path("id") String id);
|
||||
|
||||
@GET("listFood")
|
||||
Call<List<Food>> listFoodByPagination(@Query("page") int page, @Query("limit") int limit);
|
||||
@GET("detail/{id}")
|
||||
Call<Food> detailFood(@Path("id") String id);
|
||||
|
||||
@GET("detail/{id}/image")
|
||||
Call<List<ImageFood>> getImageFoodById(@Path("id") String id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user