Welcome to the backend for Bruin Dining.

Below are certain examples of endpoints that are available to be used. Using these endpoints, third party developers can build webapps, mobile apps, or even provide statistical information on the type/quality/diversity of the food offered at UCLA.
Get the overview menus for all the dining halls. Create a GET request with the following format: bruindining.herokuapp.com/overview?date=YYYY-MM-DD. If the date is not specified, the default date is set to today's date. The following shows an example of the output one would expect from making this GET request. The returned JSON object can then be parsed or pretty-printed with your program of choice.

  {  
    "breakfast":
    {  
        "Covel":
        {  
          "Exhibition Kitchen":
          [  
            {  
              "name":"Cheese Omelet",
              "recipelink":"http://menu.dining.ucla.edu/Recipes/061039/1",
              "itemcodes":
              [  
                  "AMLK",
                  "AEGG"
              ]
            }, 
            {etc. other menu items}
          ], 
          {etc. other grill options}
        }, 
        {etc. other dining halls}
      },
    "lunch":
    {  
      "Covel":
      {  
        "Exhibition Kitchen":
        [  
          {  
            "name":"Chicken Linguini Alfredo",
            "recipelink":"http://menu.dining.ucla.edu/Recipes/306002/6",
            "itemcodes":
            [  
                "AMLK",
                "AWHT"
            ]
          },
          {etc. other menu items}
        ],
        {etc. other grill options}
      },
      {etc. other dining halls}
    },
    "dinner":
    {  
      "Covel":
      {  
        "Exhibition Kitchen":
        [  
          {  
            "name":"Beef Tri Tip",
            "recipelink":"http://menu.dining.ucla.edu/Recipes/157026/3",
            "itemcodes":
            [  
                "ASOY"
            ]
          },
          {etc. other menu items}
        ],
        {etc. other grill options}
      },
      {etc. other dining halls}
    }
  }
            
Create a GET request with the following format: bruindining.herokuapp.com/hours?date=YYYY-MM-DD. If the date is not specified, the default date is set to today's date. The following shows an example of the output one would expect from making this GET request. The returned JSON object can then be parsed or pretty-printed with your program of choice.

  [
    {
      "hall_name": "Covel",
      "breakfast": "7:00 am - 9:00 am",
      "lunch": "11:00 am - 2:00 pm",
      "dinner": "5:00 pm - 8:00 pm",
      "late_night": "CLOSED"
    },
    {
      "hall_name": "Café 1919",
      "breakfast": "7:00 am - 11:00 am",
      "lunch": "11:00 am - 2:00 pm",
      "dinner": "CLOSED",
      "late_night": "CLOSED"
    },
    {
      "hall_name": "Rendezvous",
      "breakfast": "7:00 am - 10:30 am",
      "lunch": "11:00 am - 4:30 pm",
      "dinner": "5:00 pm - 9:00 pm",
      "late_night": "CLOSED"
    }
  ]
            
Get the overview menus for all the cafes. Create a GET request with the following format: bruindining.herokuapp.com/cafes. No date is needed to be specified as the menu does not change on a daily basis. The following shows an example of the output one would expect from making this GET request. The returned JSON object can then be parsed or pretty-printed with your program of choice.

  {  
    "Cafe-1919":{  
        "Breakfast":[  
          {  
              "name":"Breakfast Calzone w/ Bacon",
              "recipelink":"http://menu.dining.ucla.edu/Recipes/141233/1",
              "itemDescription":"Bacon, Eggs, Spinach, Shredded Mozzarella, Asiago & Parmesan Cheese, and Diced Tomatoes wrapped in our Pizza Dough, baked to perfection.",
              "itemCodes":[  
                "AMLK",
                "AEGG",
                "AWHT"
              ],
              "itemCost":"$4.75"
          },
          {  
              "name":"Breakfast Calzone w/ Prosciutto",
              "recipelink":"http://menu.dining.ucla.edu/Recipes/141057/1",
              "itemDescription":"Prosciutto, Eggs, Spinach, Shredded Mozzarella, Asiago & Parmesan Cheese, and Diced Tomatoes wrapped in our Pizza Dough, baked to perfection",
              "itemCodes":[  
                "AMLK",
                "AEGG",
                "AWHT"
              ],
              "itemCost":"$4.75"
          },
          {  
              "name":"Breakfast Calzone, Vegetarian",
              "recipelink":"http://menu.dining.ucla.edu/Recipes/141198/1",
              "itemDescription":"Eggs, Spinach, Shredded Mozzarella, Asiago & Parmesan Cheese, and Diced Tomatoes wrapped in our Pizza Dough, baked to perfection.",
              "itemCodes":[  
                "V",
                "AMLK",
                "AEGG",
                "AWHT"
              ],
              "itemCost":"$4.75"
          },
          {etc other items for this meal subgroup}
        ],
        [etc other meal subgroups for this cafe]
      },
      {etc other cafes like Rendezvous and more}
    }
          
Get the menu for individual cafes. Create a GET request with the following format: bruindining.herokuapp.com/[CAFE_NAME]. No date is needed to be specified as the menu does not change on a daily basis. The different possible values for CAFE_NAME are: DeNeve-GrabNGo, Hedrick-Study, Cafe-1919, Bruin-Cafe, BruinPlate-GrabNGoBreakfast, DeNeve-LateNight, and Rendezvous. The following shows an example of the output one would expect from making this GET request (the following is a snippet from the Rendezvous endpoint). The returned JSON object can then be parsed or pretty-printed with your program of choice.

  {  
    "Friday Specials":[  
      {  
          "name":"Chicken Enchiladas",
          "recipelink":"http://menu.dining.ucla.edu/Recipes/111274/2",
          "itemDescription":"Two Corn Tortillas rolled up with seasoned Stewed Chicken, topped with Guajillo Chili Sauce, Cheddar & Monterey Jack Cheeses, shredded Iceberg Lettuce, Sour Cream, and a Tomato Wedge. Served with Mexican Rice and Refried Beans.",
          "itemCodes":[  
            "AMLK",
            "AWHT"
          ],
          "itemCost":"$7.75"
      },
      {  
          "name":"Potato Enchiladas",
          "recipelink":"http://menu.dining.ucla.edu/Recipes/140559/2",
          "itemDescription":"Two Corn Tortillas rolled up with seasoned Potatoes, topped with Guajillo Chili Sauce, Cheddar & Monterey Jack Cheeses, shredded Iceberg Lettuce, Sour Cream, and a Tomato Wedge. Served with Mexican Rice and Refried Beans.",
          "itemCodes":[  
            "V",
            "AMLK",
            "AWHT"
          ],
          "itemCost":"$7.25"
      },
      {etc other items for Friday Specials}
    ],
    [etc other meal subgroups]
  }
        

Quick links

http://bruindining.herokuapp.com/overview?date=
http://bruindining.herokuapp.com/hours?date=
http://bruindining.herokuapp.com/cafes
http://bruindining.herokuapp.com/

Remarks

Backend powered by Node.js and hosted on Heroku.
Frontend contributed by Ardis Lu
Other projects by Sahil, Jonathan, and Vansh.
If you would like to contribute to the code, or would like other endpoints/features, you can check out the repo for the backend here.