Class MealService

java.lang.Object
edu.ucsb.cs156.dining.services.MealService

@Service public class MealService extends Object
Service class to interact with Meal
  • Constructor Details

    • MealService

      public MealService(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
  • Method Details

    • getMeals

      public List<Meal> getMeals(LocalDateTime dateTime, String diningCommonsCode) throws Exception
      Fetches all meals served in a particular dining commons on a specific date.
      Parameters:
      dateTime - the date and time as a LocalDateTime
      diningCommonsCode - the dining commons code
      Returns:
      a list of meals (e.g., breakfast, lunch, dinner)
      Throws:
      Exception - if the API request fails