Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davenaugler/assignment_10_spoonacular_rest_api

Using Spoonacular's API to Generate Meal Plan for the Day and Week, with Nutritional Information
https://github.com/davenaugler/assignment_10_spoonacular_rest_api

java maven spring-boot

Last synced: about 2 months ago
JSON representation

Using Spoonacular's API to Generate Meal Plan for the Day and Week, with Nutritional Information

Awesome Lists containing this project

README

        

# Assignment_10_Spoonacular_Rest_API

## Get Spoonacular apiKey
1. Go to https://spoonacular.com/food-api/console#Dashboard
2. Create an account and grab a free apiKey
3. Within `src/main/resources/application.properties` replace `add_your_apiKey_here` with your apiKey
- Thank you **Z** for reaching out and brining this to my attention.


## Start App via
1. Clone repo
2. Run the app
3. Navigate to `http://localhost:8080/mealplanner/day` and `http://localhost:8080/mealplanner/week` to see the daily and weekly options via Spoonacular's Rest API.
- Refresh browser to view other options

## Application Packages Contain
- **Config Package:** This package manages Spoonacular configurations for the project
- **Controller Package:** This package contains the controller for this application
- **DTOs (Data Transfer Objects):** DTO structures the data as well as POJO's for the app
- **Model Package:** This package contains the data models for `DayResponse` and `WeekResponse`
- **Service Package:** This package contains the business logic
- **Assignment10Application:** Contains the static void main for the application
- **application.properties:** Stores my Spoonacular API key and URL components here.
- **Unit Test:** Contains Spoonacular API Unit Tests
- A work in progress.

## Structure for Spoonacular Rest API Application
```CSS
src
└── main
├── java
│ └── com.spoonacular
│ └── .Assignment_10
│ ├── config
│ │ └── RestTemplateConfig.java
│ │ └── SpoonacularProperties.java
│ ├── controller
│ │ └── MealPlannerController.java
│ ├── domain
│ │ └── Meals.java
│ │ └── Nutrients.java
│ ├── dto
│ │ └── Meals.java
│ │ └── Nutrients.java
│ │ └── Week.java
│ ├── model
│ │ └── DayResponse.java
│ │ └── WeekResponse.java
│ ├── service
│ │ ├── MealPlannerService.java
│ └── Assignment10Application.java
└── resources
└── application.properties

```