Difference between revisions of "API Judging Scores"
From zFairs Contest Management
(Created page with "== Judging Scores == You can use our api to access your judges scores for a given round. To do this you need to POST a message to your site. Below is an example of what needs...") |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
<syntaxhighlight lang="JavaScript" line> | <syntaxhighlight lang="JavaScript" line> | ||
− | fetch('/api/data/ | + | fetch('/api/data/JudgingScoresForRound', { |
method:'POST', | method:'POST', | ||
headers:{'Content-Type': 'application/json'}, | headers:{'Content-Type': 'application/json'}, | ||
body: JSON.stringify({ | body: JSON.stringify({ | ||
− | + | ApiKey:'<Private key>', | |
− | |||
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f | FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f | ||
Body: { | Body: { | ||
− | RoundId: 1, | + | RoundId: 1, // see below on how to get round Id |
} | } | ||
}) | }) | ||
Line 21: | Line 20: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | You can get round info by calling our get info api. [[API Get Info]] | ||
+ | |||
+ | |||
+ | |||
+ | <br/><br/><br/><br/> | ||
+ | [[Category: API]] |
Latest revision as of 20:55, 10 April 2024
Judging Scores
You can use our api to access your judges scores for a given round. To do this you need to POST a message to your site. Below is an example of what needs to be posted. You can get round Id from the get info api call, judge id, and project key are returned when a judge or project is added.
fetch('/api/data/JudgingScoresForRound', {
method:'POST',
headers:{'Content-Type': 'application/json'},
body: JSON.stringify({
ApiKey:'<Private key>',
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f
Body: {
RoundId: 1, // see below on how to get round Id
}
})
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});
You can get round info by calling our get info api. API Get Info