Widen the OVR range of your tournament
const url = 'https://foxleague.ai/api/tournaments/1/ovr-range';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ovr_max":1,"ovr_min":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://foxleague.ai/api/tournaments/1/ovr-range \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ovr_max": 1, "ovr_min": 1 }'Replaces the OVR range of a tournament or 1v1 challenge you created with a wider one while it is open for joining. Each side of the body has three states: a side left out keeps its bound, null removes it and a whole number from 1 to 100 sets it. So {"ovr_max": 45} on a range of 30 to 40 gives 30 to 45; {"ovr_min": null} removes the minimum. An empty object {} asks for no change and is refused like the same range. The range may only get wider: a lower ovr_min, a higher ovr_max or a bound removed. Removing both removes the range. It never gets narrower, so a team that already joined stays inside it. The answer gives the range now and the range before it. Every later join is checked against the new range.
Who: a signed-in player: the creator or an admin.
Refusals:
Not registered: the wallet has no player account.Tournament not found: no tournament has this id.Only the creator of this tournament or an admin can change its OVR range.: a 1v1 challenge sayschallenge.Champions FoxLeague invites its teams from the leaderboard, so it takes no OVR range.: aleague_knockouttournament.A developer tournament is played by uploaded binaries, so it takes no OVR range.The range can be changed only while the tournament is open for joining.: the status is notopenor the registration deadline has passed; a 1v1 challenge sayschallenge.The OVR range takes whole numbers from 1 to 100.:ovr_minorovr_maxbelow 1 or above 100.This tournament has no OVR range: it already takes teams of any OVR.: a 1v1 challenge sayschallenge.The range is already <range>: nothing to change.: the same range again or{}.<range>reads like30 to 40,at most 35orat least 30.You can only widen the range: a side with no bound stays without one.:ovr_minon a range with no minimum orovr_maxon a range with no maximum.You can only widen the range: lower the minimum or raise the maximum.: anovr_minabove the range’s minimum or anovr_maxbelow its maximum.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The tournament id.
Request Body required
Section titled “Request Body required ”The change to the OVR range, per side: left out keeps the bound, null removes it, a number sets it. The result may only be wider than the range it replaces.
object
The new highest best XI OVR a joining team may have, a whole number from 1 to 100: at least the current ovr_max. Left out: the current maximum stays. null: no maximum.
The new lowest best XI OVR a joining team may have, a whole number from 1 to 100: at most the current ovr_min. Left out: the current minimum stays. null: no minimum.
Example generated
{ "ovr_max": 1, "ovr_min": 1}Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
object
A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.
The answer. Present when success is true.
object
The highest best XI OVR a joining team may have now. null when there is none.
The lowest best XI OVR a joining team may have now. null when there is none.
The maximum before the change. null when there was none.
The minimum before the change. null when there was none.
The tournament id.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
Example
{ "data": { "ovr_max": 40, "ovr_min": 25, "previous_ovr_max": 40, "previous_ovr_min": 30, "tournament_id": 1712 }, "success": true}No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.
Example
Session expired or invalid