Get Results from Competitions
Back to Instructions / back to API intro
Method: Get Results
Get Results method can be used to query results for a given competition. Competition in this context can be a single round, top level competition record with multiple rounds or even a series of competitions.
Example URL
1. https://discgolfmetrix.com/api.php?content=result_html&id=437198. Returns html
2. https://discgolfmetrix.com/api.php?content=result&id=437198. Returns json
Parameters
* asterisk indicates a Mandatory parameter
Parameter | Value (example) | Purpose / description | |
---|---|---|---|
content* | result OR result_html | API method name | |
id* | 12345 | Competition ID | |
class | MPO | Players filter by class/division | |
group | 1 | Players filter by group | |
code | Take the code from your Settings. Without the code only public competitions are available. |
JSON Response
{
"Competition":{
"ID":"437198",
"Name":"API Example",
"Type":"2",
"TourDateStart":null,
"TourDateEnd":null,
"Date":"2017-06-02",
"Time":"09:34:00",
"Comment":"",
"CourseName":"Epilu00e4 DiscGolfPark → DGP-9 (2012)",
"CourseID":"3091",
"MetrixMode":"0",
"ShowPreviousRoundsSum":null,
"WeeklyHCSummary":null,
"WeeklyHC":[],
"Results":[
{
"UserID":"130",
"Name":"Mikko Juola",
"ClassName":"",
"CountryCode":"FI",
"Group": "1",
"PlayerResults":[
{
"Result":"3",
"Diff":-1,
"OB":"0"
},
{
"Result":"3",
"Diff":0,
"OB":"0"
},
{ ---- repeating structures truncated from example ---- },
{
"Result":"4",
"Diff":1,
"OB":"0"
}
],
"Penalty":null,
"Sum":26,
"Diff":-2,
"DNF":null,
"PreviousRoundsSum":null,
"PreviousRoundsDiff":null,
"OrderNumber":1
}
],
"Tracks":[
{
"Number":"1",
"NumberAlt":"",
"Par":"4"
},
{
"Number":"2",
"NumberAlt":"",
"Par":"3"
},
{ ---- repeating structures truncated from example ---- },
{
"Number":"9",
"NumberAlt":"",
"Par":"3"
}
],
"SubCompetitions":[]
},
"Errors":[
"(content) parameter is unknown"
]
}
"Competition":{
"ID":"437198",
"Name":"API Example",
"Type":"2",
"TourDateStart":null,
"TourDateEnd":null,
"Date":"2017-06-02",
"Time":"09:34:00",
"Comment":"",
"CourseName":"Epilu00e4 DiscGolfPark → DGP-9 (2012)",
"CourseID":"3091",
"MetrixMode":"0",
"ShowPreviousRoundsSum":null,
"WeeklyHCSummary":null,
"WeeklyHC":[],
"Results":[
{
"UserID":"130",
"Name":"Mikko Juola",
"ClassName":"",
"CountryCode":"FI",
"Group": "1",
"PlayerResults":[
{
"Result":"3",
"Diff":-1,
"OB":"0"
},
{
"Result":"3",
"Diff":0,
"OB":"0"
},
{ ---- repeating structures truncated from example ---- },
{
"Result":"4",
"Diff":1,
"OB":"0"
}
],
"Penalty":null,
"Sum":26,
"Diff":-2,
"DNF":null,
"PreviousRoundsSum":null,
"PreviousRoundsDiff":null,
"OrderNumber":1
}
],
"Tracks":[
{
"Number":"1",
"NumberAlt":"",
"Par":"4"
},
{
"Number":"2",
"NumberAlt":"",
"Par":"3"
},
{ ---- repeating structures truncated from example ---- },
{
"Number":"9",
"NumberAlt":"",
"Par":"3"
}
],
"SubCompetitions":[]
},
"Errors":[
"(content) parameter is unknown"
]
}
HTML Response
HTML response includes a element representing a results table. Example shown as screenshot.
Back to Instructions / back to API intro