This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch' | |
import Trip from '../customTypes/Trip' | |
import Station, { StationType } from '../customTypes/Station' | |
import moment from 'moment' | |
const { NS_API_PRIMARY_KEY } = process.env | |
const headers = { ['Ocp-Apim-Subscription-Key' as string]: NS_API_PRIMARY_KEY || '' } | |
const apiUrl = 'https://gateway.apiportal.ns.nl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$service = new Service(); | |
$clientResource = new Resource('/client', new Client(), new ClientController); | |
$clientResource->addCustomRoute('GET', '/find', array(new ClientController, 'find'), array('name')); | |
$service->addResource($clientResource); | |
$request = Request::current(); | |
$request->setBootstrapPath('/service'); // e.g. when the full path is http://www.mydomain.com/service | |
$response = $service->resolve($request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace application\commands; | |
use application\models\Request as Request; | |
abstract class AbstractCommand { | |
public function __construct(){} | |