-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FEATURE] Export or API match data #590
Comments
hi, I didn't catch the feature request here, so sorry for the late response. i'll response when it's finished |
Great to hear. Any idea on the timeline? Is it something for the coming days or rather months? |
The endpoint is finally upgraded (had some blocking things for the new enrolments). FYI: for clubs and players you can use the slug as |
I'm looking for a way to export all games (including players) of a team or a club. Games endpointThe games endpoint only contains a
This filter complains that the competition cannot be filtered (ignore the exact filter):
Filtering on child attributes does work:
I see that you use a Team endpointUsing the Team > Player > Games endpoint, fails with following message:
Player endpointThe player endpoint works for getting games but is of course not useful for all games of a team.
|
hi, Basically the "where" is a and filter on the keys of that toplevel type (so no deep nesting). if you want dat you can place a second where on that level. there are some operators available, you can find them here: queryFixer (For example the For getting all games of all your teams I suggest you do the following:
query TeamEncounters($where: JSONObject, $take: Int, $order: [SortOrderType!]) {
encounterCompetitions(where: $where, order: $order, take: $take) {
rows {
id
date
home {
id
name
}
away {
id
name
}
homeScore
awayScore
games {
id
set1Team1
set1Team2
set2Team1
set2Team2
set3Team1
set3Team2
players {
id
fullName
team
player
}
}
drawCompetition {
id
subEventCompetition {
id
eventType
eventId
}
}
}
}
} with the following set of variables, the home and away set of ids should be the same {
"where": {
"$or": [
{
"homeTeamId": [] //<your set of ids>
},
{
"awayTeamId": [] //<your set of ids>
}
]
},
"order": [
{
"direction": "desc",
"field": "date"
}
],
"take": 10
} note: i'm changing some data layout and the |
Works perfectly, thanks! I forgot to include a filter is some requests which may have caused a 502... |
You should be able to fetch this via the single/double/mix property (which will also be moved to that subtype) in (near) feature release (!) query TeamEncounters($where: JSONObject, $take: Int, $order: [SortOrderType!]) {
encounterCompetitions(where: $where, order: $order, take: $take) {
rows {
# ... existing
games {
# ... existing
players {
id
fullName
team
player
# new stuff
single
double
mix
# done new stuff
}
}
}
}
} Or if you mean points earned/lost, in that case add on the rankingPoints{
id
differenceInLevel
points
playerId
} And to know if it counts you need to check if the difference in level is lower then the following property on the system: differenceForDowngradeSingle
differenceForDowngradeDouble
differenceForDowngradeMix |
@cskiwi Worked perfectly, thanks for all the information and help. In case you would be interested, I built a tableau dashboard based on the badman data: Tableau link |
🚀 feature request
Description
I would like to use match data in external dashboarding services (such as Tableau).
Describe the solution you'd like
Export of all matches of certain player or club (in web UI) OR API documentation to extract it programmatically.
In the network tab I can see some graphQl calls, but i'm not sure how to use them to extract all historic data.
curl 'https://badman.app/graphql' \ -H 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \ -H 'Content-Type: application/json' \ -H 'X-App-Magic: 1' \ -H 'Accept: application/json; charset=utf-8' \ -H 'Referer: https://badman.app/player/maxim-verbruggen' \ -H 'sec-ch-ua-platform: "Windows"' \ --data-raw $'{"operationName":"GamesPage_3_S_D_MX","variables":{"id":"61c8abb8-ecdb-4535-ad94-21101897648d","where":{"playedAt":{"$lte":"2024-02-01"},"gameType":{"$in":["S","D","MX"]}},"whereRanking":{"systemId":"934116c8-ee7e-4f3c-9c8b-6de579c3686f"},"order":[{"direction":"desc","field":"playedAt"},{"direction":"desc","field":"id"}],"skip":20,"take":10},"query":"query GamesPage_3_S_D_MX($id: ID\u0021, $where: JSONObject, $whereRanking: JSONObject, $take: Int, $skip: Int, ....
The text was updated successfully, but these errors were encountered: