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

What is the data structure for knockout games? #81

Open
stephenzengwoodside opened this issue Nov 23, 2022 · 6 comments
Open

What is the data structure for knockout games? #81

stephenzengwoodside opened this issue Nov 23, 2022 · 6 comments

Comments

@stephenzengwoodside
Copy link

What is the data structure for knockout games? For example the response from this one:

POST http://api.cup2022.ir/api/v1/bydate

@jjmpsp
Copy link

jjmpsp commented Nov 23, 2022

{
    "status": "success",
    "data": [
        {
            "_id": "629c9c8a5749c4077500eb00",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "29",
            "finished": "FALSE",
            "group": "H",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "28",
            "id": "45",
            "local_date": "12/2/2022 18:00",
            "matchday": "13",
            "persian_date": "1400-09-11 18:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "غنا",
            "away_team_fa": "اروگوئه",
            "home_team_en": "Ghana",
            "away_team_en": "Uruguay",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Flag_of_Ghana.svg/125px-Flag_of_Ghana.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Flag_of_Uruguay.svg/125px-Flag_of_Uruguay.svg.png"
        },
        {
            "_id": "629c9c8a5749c4077500eb01",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "27",
            "finished": "FALSE",
            "group": "H",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "30",
            "id": "46",
            "local_date": "12/2/2022 18:00",
            "matchday": "13",
            "persian_date": "1400-09-11 18:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "کره جنوبی",
            "away_team_fa": "پرتغال",
            "home_team_en": "South Korea",
            "away_team_en": "Portugal",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Flag_of_South_Korea.svg/125px-Flag_of_South_Korea.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_Portugal.svg/125px-Flag_of_Portugal.svg.png"
        },
        {
            "_id": "629c9c8a5749c4077500eb02",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "31",
            "finished": "FALSE",
            "group": "G",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "26",
            "id": "47",
            "local_date": "12/2/2022 22:00",
            "matchday": "13",
            "persian_date": "1400-09-11 22:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "صربستان",
            "away_team_fa": "سوئیس",
            "home_team_en": "Serbia",
            "away_team_en": "Switzerland",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Flag_of_Serbia.svg/125px-Flag_of_Serbia.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Switzerland.svg/100px-Flag_of_Switzerland.svg.png"
        },
        {
            "_id": "629c9c8a5749c4077500eb03",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "32",
            "finished": "FALSE",
            "group": "G",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "25",
            "id": "48",
            "local_date": "12/2/2022 22:00",
            "matchday": "13",
            "persian_date": "1400-09-11 22:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "برزیل",
            "away_team_fa": "کامرون",
            "home_team_en": "Brazil",
            "away_team_en": "Cameroon",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Flag_of_Brazil.svg/125px-Flag_of_Brazil.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Flag_of_Cameroon.svg/125px-Flag_of_Cameroon.svg.png"
        }
    ]
}

@DrCuddless
Copy link

I believe he is asking what the data structure will look like when we leave the group stage of the world cup and enter the knockout stage. I am also interested in this information.

@dcardonac31
Copy link

The owner of this project should share access to collaborate on it.

@xortuna
Copy link

xortuna commented Nov 25, 2022

How would one determine who wins a knock out match, as the score might be 1-1 and then go to penalties

@stephenzengwoodside
Copy link
Author

{
    "status": "success",
    "data": [
        {
            "_id": "629c9c8a5749c4077500eb00",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "29",
            "finished": "FALSE",
            "group": "H",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "28",
            "id": "45",
            "local_date": "12/2/2022 18:00",
            "matchday": "13",
            "persian_date": "1400-09-11 18:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "غنا",
            "away_team_fa": "اروگوئه",
            "home_team_en": "Ghana",
            "away_team_en": "Uruguay",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Flag_of_Ghana.svg/125px-Flag_of_Ghana.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Flag_of_Uruguay.svg/125px-Flag_of_Uruguay.svg.png"
        },
        {
            "_id": "629c9c8a5749c4077500eb01",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "27",
            "finished": "FALSE",
            "group": "H",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "30",
            "id": "46",
            "local_date": "12/2/2022 18:00",
            "matchday": "13",
            "persian_date": "1400-09-11 18:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "کره جنوبی",
            "away_team_fa": "پرتغال",
            "home_team_en": "South Korea",
            "away_team_en": "Portugal",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Flag_of_South_Korea.svg/125px-Flag_of_South_Korea.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_Portugal.svg/125px-Flag_of_Portugal.svg.png"
        },
        {
            "_id": "629c9c8a5749c4077500eb02",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "31",
            "finished": "FALSE",
            "group": "G",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "26",
            "id": "47",
            "local_date": "12/2/2022 22:00",
            "matchday": "13",
            "persian_date": "1400-09-11 22:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "صربستان",
            "away_team_fa": "سوئیس",
            "home_team_en": "Serbia",
            "away_team_en": "Switzerland",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Flag_of_Serbia.svg/125px-Flag_of_Serbia.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Switzerland.svg/100px-Flag_of_Switzerland.svg.png"
        },
        {
            "_id": "629c9c8a5749c4077500eb03",
            "away_score": 0,
            "away_scorers": [
                "null"
            ],
            "away_team_id": "32",
            "finished": "FALSE",
            "group": "G",
            "home_score": 0,
            "home_scorers": [
                "null"
            ],
            "home_team_id": "25",
            "id": "48",
            "local_date": "12/2/2022 22:00",
            "matchday": "13",
            "persian_date": "1400-09-11 22:30",
            "stadium_id": "1",
            "time_elapsed": "notstarted",
            "type": "group",
            "home_team_fa": "برزیل",
            "away_team_fa": "کامرون",
            "home_team_en": "Brazil",
            "away_team_en": "Cameroon",
            "home_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Flag_of_Brazil.svg/125px-Flag_of_Brazil.svg.png",
            "away_flag": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Flag_of_Cameroon.svg/125px-Flag_of_Cameroon.svg.png"
        }
    ]
}

Thanks for the info and I am aware this data structure already. In this data structure it has properties type and group. What are the values for them when it is a knock-out game?

@kukukk
Copy link

kukukk commented Nov 28, 2022

It would be useful some additional statuses or fields to differentiate the scores between after extra time and after penalties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants