Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dining V2 Malformatted #93

Open
joshdoman opened this issue Feb 11, 2018 · 4 comments
Open

Dining V2 Malformatted #93

joshdoman opened this issue Feb 11, 2018 · 4 comments
Assignees
Labels

Comments

@joshdoman
Copy link
Member

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.

@ezwang
Copy link
Member

ezwang commented Feb 11, 2018

@andrewsi10 Would this break anything on the android version of the app if we made this change?

@joshdoman
Copy link
Member Author

@ezwang Can't speak to Android but for iOS it would not. We are not using v2 for our dining API.

@ezwang
Copy link
Member

ezwang commented Feb 11, 2018

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"
        }
    ]
}

@andrewsi10
Copy link

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.

@ezwang ezwang added the bug label Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants