public interface SpoonacularServiceProxy
Modifier and Type | Interface and Description |
---|---|
static class |
SpoonacularServiceProxy.InstanceHolder
This nested class contains the Gson and retofit builders.
|
Modifier and Type | Method and Description |
---|---|
Single<RecipeDto> |
get(long id,
String apiKey)
This method gets the details of a single recipe using the id.
|
static SpoonacularServiceProxy |
getInstance()
This is the getter fot the SpoonacularServiceProxy instance.
|
Single<List<RecipeDto>> |
search(String ingredients,
String apiKey)
This method is the @Get request to the api service for a collection of recipes.
|
@GET(value="recipes/findByIngredients") Single<List<RecipeDto>> search(@Query(value="ingredients") String ingredients, @Query(value="apiKey") String apiKey)
ingredients
- is used to find a recipe that include those ingredients.apiKey
- is part of required params for a search using the api service.@GET(value="recipes/{id}/information") Single<RecipeDto> get(@Path(value="id") long id, @Query(value="apiKey") String apiKey)
id
- is the id of a specific recipe.apiKey
- is part of required params for a search using the api service.static SpoonacularServiceProxy getInstance()