opencoil-paracity/website/test-json.php

16 lines
735 B
PHP
Raw Normal View History

<?php
// JSON tester to send out fake tier API responses to test our scripts and not abuse the Tier server
// NOTE: DOES NOT WORK LOCALLY
// Usage: https://opencoil.show/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}}}';
?>