12345678910111213141516171819202122232425 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 10/1/16
- * Time: 5:32 PM
- */
-
- namespace App\DataAccess;
-
-
- use GuzzleHttp\Client;
- use Luticate\Utils\Controller\LuticateApplication;
-
- class SchedulesDataAccess
- {
- public static function get(string $resourceId, string $type, string $stopId, string $routeId)
- {
- $client = new Client();
- $entrypoint = LuticateApplication::getInstance()->getSetting("API_ENTRYPOINT");
- $response = $client->request("GET", $entrypoint . "transit/${resourceId}/${type}/stops/${stopId}/routes/${routeId}/schedule.json");
- $data = json_decode($response->getBody(), true);
- return $data;
- }
- }
|