mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Add Category tag to Search Fragment
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.capstone.foodify.API;
|
||||
|
||||
import com.capstone.foodify.Model.Category.Category;
|
||||
import com.capstone.foodify.Model.Food.Food;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
@@ -10,6 +11,7 @@ import retrofit2.Call;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
|
||||
@@ -30,4 +32,10 @@ public interface FoodApi {
|
||||
|
||||
@GET("listFood")
|
||||
Call<List<Food>> listFood(@Query("search") String search);
|
||||
|
||||
@GET("Category")
|
||||
Call<List<Category>> listCategory();
|
||||
|
||||
@GET("Category/{id}/food")
|
||||
Call<List<Food>> listFoodByCategory(@Path("id") String id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user