Package edu.ucsb.cs156.dining.services
Class DiningCommonsService
java.lang.Object
edu.ucsb.cs156.dining.services.DiningCommonsService
Service object that wraps the UCSB Dining Commons API
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDiningCommonsService
(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) -
Method Summary
Modifier and TypeMethodDescriptiongetMealsByDateJSON
(LocalDateTime date, String diningCommonsCode) Get the meals for a specific dining commons by dategetMenuItemsByMealAndDateJSON
(LocalDateTime date, String diningCommonsCode, String meal) Get the meals for a specific dining commons by date
-
Field Details
-
NAMES_ENDPOINT
- See Also:
-
MEALS_BY_DATE_ENDPOINT
- See Also:
-
-
Constructor Details
-
Method Details
-
getDiningCommonsJSON
- Throws:
Exception
-
getMealsByDateJSON
Get the meals for a specific dining commons by date- Parameters:
date
-diningCommonsCode
-- Returns:
- meals by date by dining common
- Throws:
Exception
-
getMenuItemsByMealAndDateJSON
public String getMenuItemsByMealAndDateJSON(LocalDateTime date, String diningCommonsCode, String meal) throws Exception Get the meals for a specific dining commons by date- Parameters:
date
-diningCommonsCode
-meal
-- Returns:
- meals by date by dining common
- Throws:
Exception
-