28 lines
806 B
PHP
28 lines
806 B
PHP
<?php
|
|
|
|
include_once "../../global.inc.php";
|
|
require_once PATH_API . "/PssApi.php";
|
|
|
|
// get reguest header
|
|
$headers = apache_request_headers();
|
|
// instance a new api
|
|
$app = new \api\PssApi($headers);
|
|
|
|
// HTTP-Get-Method
|
|
$app->get(\api\PssApi::$routeParameterPids . \api\PssApi::$routeParameterSNames, function ($pid, $sNames = array()) use ($app) {
|
|
$queryArgs = array();
|
|
$queryArgs[\api\PssApi::$keyPidList] = $pid;
|
|
$queryArgs[\api\PssApi::$keySNameList] = $sNames;
|
|
echo $app->sendPssQuery($queryArgs);
|
|
});
|
|
|
|
$app->get(\api\PssApi::$routeParameterPids, function ($pid) use ($app) {
|
|
$queryArgs = array();
|
|
$queryArgs[\api\PssApi::$keyPidList] = $pid;
|
|
echo $app->sendPssQuery($queryArgs);
|
|
});
|
|
|
|
$app->run();
|
|
|
|
?>
|