To run the API locally, run the following command in the project directory.
docker-compose up --build
This will download and build all required files for the api.
You can check by going to:
Going to this address should return a JSON file.
To stop the API run the following command.
docker-compose down --rmi all
This will stop all containers and remove them.
Below is all the availible Paths and supported methods
Going to http://localhost:8080/home will return a JSON array with each object containing the following attributes.
{
"id":"hash",
"taken_at_timestamp":"timestamp",
"display_url":"url to image",
"caption":"text for that image"
}
This collection will be autopopulated based on doomsday's instagram.
Going to http://localhost:8080/foods will return a JSON array with each object containing the following attributes.
{
"id":"hash",
"Name":"name of food",
"Price":"price for food",
"image":"image stored as base64",
"ingredients":[
"array", "of", "ingredients"
]
}
Going to http://localhost:8080/drinks will return a JSON array with each object containing the following attributes.
{
"id":"hash",
"Name":"name of drink",
"Price":"price for drink",
"image":"image stored as base64",
"ingredients":[
"array", "of", "ingredients"
]
}
Sending a POST request to http://localhost:8080/food with a JSON object will be saved to the food collections. Expected JSON structure.
{
"Name":"name of food",
"Price":"price for food",
"image":"image stored as base64",
"ingredients":[
"array", "of", "ingredients"
]
}
Sending a POST request to http://localhost:8080/drink with a JSON object will be saved to the food collections. Expected JSON structure.
{
"Name":"name of drink",
"Price":"price for drink",
"image":"image stored as base64",
"ingredients":[
"array", "of", "ingredients"
]
}