Package edu.ucsb.cs156.dining.services
Class MealService
java.lang.Object
edu.ucsb.cs156.dining.services.MealService
Service class to interact with Meal
-
Constructor Summary
ConstructorDescriptionMealService
(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) -
Method Summary
Modifier and TypeMethodDescriptiongetMeals
(LocalDateTime dateTime, String diningCommonsCode) Fetches all meals served in a particular dining commons on a specific date.
-
Constructor Details
-
MealService
public MealService(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
-
-
Method Details
-
getMeals
Fetches all meals served in a particular dining commons on a specific date.- Parameters:
dateTime
- the date and time as a LocalDateTimediningCommonsCode
- the dining commons code- Returns:
- a list of meals (e.g., breakfast, lunch, dinner)
- Throws:
Exception
- if the API request fails
-