Class DiningCommonsService

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

@Service public class DiningCommonsService extends Object
Service object that wraps the UCSB Dining Commons API
  • Field Details

  • Constructor Details

    • DiningCommonsService

      public DiningCommonsService(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) throws Exception
      Throws:
      Exception
  • Method Details

    • getDiningCommonsJSON

      public String getDiningCommonsJSON() throws Exception
      Throws:
      Exception
    • getMealsByDateJSON

      public String getMealsByDateJSON(LocalDateTime date, String diningCommonsCode) throws Exception
      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