Returns a list of entrants for a specified league for the authenticated RoadLeagues user.
Method | URI |
---|---|
GET |
https://roadleagues.com/api/v1/entrants?token={ACCESS-TOKEN}&lid={LID}&paginate=20 |
POST |
https://roadleagues.com/api/v1/entrants |
POST
Headers{
"Accept" : "application/json",
"Content-Type" : "application/x-www-form-urlencoded",
"Authorization" : "Bearer {ACCESS-TOKEN}"
}
POST
Data Parameters"lid" : "{LID}", // Required - Integer
"paginate" : "20", // Optional - Integer
{
"data": [
{
"eid": 1,
"userID": 1,
"clubID": 2,
"entrantName": "Paul Doe",
"entrantEmail": "paul@gmail.com",
"entrantType": "race",
"creationDate": "2020-01-07 09:44:27",
"lastUpdated": "2020-01-07 09:44:27",
"league": {
"leagueID": 1,
"leID": 8,
"raceGroup": "1",
"canAcceptEmail": null,
"emailVerified": null,
"invoiceID": null,
"feeStatus": "paid",
"blacklisted": null,
"blacklistedReason": null,
"leagueEntryDate": "2020-01-15 15:56:24",
"lastUpdated": "2020-01-15 15:56:24"
}
},
{
"eid": 2,
"userID": 1,
"clubID": 2,
"entrantName": "John Doe",
"entrantEmail": "joe@gmail.com",
"entrantType": "both",
"creationDate": "2020-01-12 19:24:33",
"lastUpdated": "2020-01-12 19:24:33",
"league": {
"leagueID": 1,
"leID": 9,
"raceGroup": "2",
"canAcceptEmail": null,
"emailVerified": null,
"invoiceID": null,
"feeStatus": "notpaid",
"blacklisted": null,
"blacklistedReason": null,
"leagueEntryDate": "2020-01-15 15:56:19",
"lastUpdated": "2020-01-15 15:56:19"
}
}
],
"links": {
"first": "https://roadleagues.com/api/v1/entrants?page=1",
"last": "https://roadleagues.com/api/v1/entrants?page=9",
"prev": null,
"next": "https://roadleagues.com/api/v1/entrants?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 9,
"path": "https://roadleagues.com/api/v1/entrants",
"per_page": "2",
"to": 2,
"total": 17
},
"extra": {
"api_author": "Richie McMullen",
"api_version": "v1",
"api_rate_limit": null,
"current_limit_count": null
}
}
{primary} A couple of examples using
Ajax
&PHP cURL
on how you might go about making aPOST
request for this endpoint. Remember to replace the placeholders with your own credentials.
$.ajax({
type: "POST",
url: "https://roadleagues.com/api/v1/entrants",
data: {
"lid": "{LID}", // Required
"paginate": "20", // Optional
},
headers: {
"Accept": 'application/json',
"Content-Type": 'application/x-www-form-urlencoded',
"Authorization": 'Bearer {ACCESS-TOKEN}',
},
dataType: "JSON",
cache: false,
success: function (data) {
console.log(data);
}
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://roadleagues.com/api/v1/entrants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "lid={LID}&paginate=20",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Content-Type: application/x-www-form-urlencoded",
"Authorization: Bearer {ACCESS-TOKEN}"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;