michigan-dining-api

This API serves information about the University of Michigan's Dining Halls.

About

Data is scraped from the University of Michigan's MDining API, formatted and stored in a database to be served. This allows for data structures and formats that are easier to work with than the original API and for historical data to be retrieved past what the MDining API offers (2019-11-02 is the earliest date available through this service). Check out the MDining statistics page of tendies time for examples of using this historical data.

The project is located on github here.
Currently this is used to support tendiesti.me.
This API can be accessed through grpc, grpc-web, or a REST API.
To access the API through grpc and grpc-web, use the proto service defininitions in mdining-proto.

GRPC

This service was built with grpc in mind. Queries through grpc to this service will be significantly faster than thier REST counterparts since REST requests are just proxied to grpc queries and therefore require serialization and deserialization between protobufs and JSON.

REST Endpoints

REST Endpoints still return data according to the service definitions in mdining-proto, but the responses will be serialized in JSON instead of binary protobuf formats.

Here is a list of REST JSON endpoints that exist as of writing (with links for example queries):

  • /v1/all

    Provides /v1/diningHalls /v1/items and /v1/filterableEntries in a single request.

  • /v1/diningHalls

    Provides an array of U of M dining halls(including cafes and markets) locations and relevant information such as address.

  • /v1/items

    Provides a list of items for today and the next seven days. For each item, information on which dining halls are serving it is included among other things.

  • /v1/filterableEntries

    Provides a list of filterable entries. Each entry includes an item name, dining hall the item is being served at, the date it is being served on and attribute information.

  • /v1/menus?date={yyyy-MM-dd}&diningHall={DINING_HALL}&meal={MEAL}

    Provides the full menu for the given date, dining hall and meal. If one or more arguments is permitted then all relevant menus are returned. This includes nutrition information for menu items.

  • /v1/foods?name={LOWERCASE_FOOD_NAME}&date={yyyy-MM-dd}&meal={MEAL}

    Provides information on where the given food is being served on the given date and meal. Includes nutrition info.

  • /v1/summarystats

    Provides summary statistics on MDining service. For example, includes information on counts of how many times each food was served on each day of the week.

  • /v1/stats

    Provides in depth information on daily MDining service. Too large in practive to be used.

  • /v1/hearts?keys={LOWERCASE_FOOD_NAME}&keys={etc...}

    Provides access to the hearts database which powers the hearts functionality on the tendies time menu page which allows users to click on a heart to indicate they like the item.