getTimeTablesList.php 1.01 KB
<?php

/**
 * @api {get} getTimeTablesList.php getTimeTableList
 * @apiDescription Provides the private list of Time Tables (Time Table or TT) owned by a user. When called without
 * userID, this web-service returns the list of shared Time Tables.
 *
 * @apiName getTimeTableList
 * @apiGroup webservices
 *
 * @apiParam {String} [userID] Identifier of the user in AMDA.
 * @apiParam {String} [password] Password of the user in AMDA.
 *
 * @apiSuccess {String} success `true`
 * @apiSuccess {String} TimeTablesList URL of the XML file, which contains the list of Time Tables.
 *
 * @apiSuccessExample Success-Response:
 * HTTP/1.1 200 OK
 * http://amda.irap.omp.eu/data/WSRESULT/timetables_impex_20180905.xml
 *
 * @apiErrorExample
 *     {"error": "Workspace Error : Cannot load TimeTable list for userID"}
 */

	require_once '../config.php';

	$amda_ws = new WebServer();

	$result = $amda_ws->getTimeTablesList($_GET);

	if ($result['success'])
	{
		echo $result['TimeTablesList'];
	}
	else 
	{
		echo $result['message'];  
	}
?>