Returns league routes
Method | URI |
---|---|
GET |
https://roadleagues.com/api/v1/routes?token={ACCESS-TOKEN}&lid={LID} |
POST |
https://roadleagues.com/api/v1/routes |
POST
Headers{
"Accept" : "application/json",
"Content-Type" : "application/x-www-form-urlencoded",
"Authorization" : "Bearer {ACCESS-TOKEN}"
}
POST
Data Parameters"lid" : "{LID}", // Required - Integer
// here
{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/routes",
data: {
"lid": "{LID}", // Required
},
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/routes",
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}", // Required
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;