added fake api script to test api response (test-json.php)
This commit is contained in:
parent
60ec0708dd
commit
a495ade686
12
website/test-json.php
Normal file
12
website/test-json.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// JSON tester to send out fake tier API responses to test our scripts and not abuse the Tier server
|
||||
|
||||
// Usage: http://localhost:8080/test-json.php?scooterID=1
|
||||
|
||||
$scooterID = htmlspecialchars($_GET["scooterID"]);
|
||||
|
||||
|
||||
// example data response for one scooter/request
|
||||
echo '{"data":{"type":"vehicle","id":"'.$scooterID.'-d739d6-554f-4eaf-bd9c-afe3d501c94b","attributes":{"state":"ACTIVE","lastLocationUpdate":"2020-10-09T08:00:29Z","lastStateChange":"2020-10-07T15:09:13Z","batteryLevel":51,"lat":52.504926,"lng":13.358061,"maxSpeed":20,"zoneId":"BERLIN","code":272581,"iotVendor":"okai","licencePlate":"115MZJ","isRentable":true,"vehicleType":"escooter","hasHelmetBox":true,"hasHelmet":true}}}';
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user