penn-sdk-python
penn-sdk-python copied to clipboard
Dining V2 Malformatted
See here: https://api.pennlabs.org/dining/v2/venues. Some of the "menu" fields are a JSON object and some are an array of JSON objects. They should all be an array of JSON objects, even if there is only one item.
This explains the discrepancy between https://api.pennlabs.org/dining/v2/venues and https://api.pennlabs.org/dining/venues.
@andrewsi10 Would this break anything on the android version of the app if we made this change?
@ezwang Can't speak to Android but for iOS it would not. We are not using v2 for our dining API.
For example, in v2
for Pret a Manger
has the following:
{
date: "2018-02-12",
meal: {
close: "16:00:00",
open: "08:00:00",
type: "Pret a Manger"
}
}
while the original endpoint gives:
{
date: "2018-02-12",
meal: [
{
close: "16:00:00",
open: "08:00:00",
type: "Pret a Manger"
}
]
}
I can confirm that the Android version does not use v2 for the dining API. The Android app would break if the meal was an object instead of a list.