Live App Available At Knead Recipes App
This is the API microservice for the Knead Recipes application. It recieves an API request, sends a request to the Spoonacular API, and returns the response back to the primary application. It was built using a Sinatra framework, and utilizes Faraday to establish it's connections.
$ git clone https://github.com/alex-latham/knead_recipes_microservice.git
$ bundle install
Get a Spoonacular key from Spoonacular
Create var.env in root microservice directory
Insert Spoonacular API key into var.env
SPOONACULAR_KEY=<YOUR API KEY>
$ bundle exec shotgun
- To return the information, in json, about a single recipe
http://localhost:9393/recipe?id=1
- To return information about multiple recipes, provide the IDs without spaces and separated by commas
http://localhost:9393/recipes?ids=1,2,3
-
To return information about multiple recipes with additional (optional) query params
- Possible querys
- ?ingredients=beef
- ?type=dessert
- ?diet=vegan
- ?time=60
- For more information visit Spoonacular Complex Search queries
- Possible querys
http://localhost:9393/recipes/compleSearch?includeIngredients=beef&time=120&type=main+course