getTimeTablesList.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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.
*
* @apiError {String} success `false`
* @apiError {String} faultcode The error code.
* @apiError {String} faultcode The error message.
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* http://cdpp1.cesr.fr/AMDA/data/WSRESULT/getTimeTablesList_gangloff.xml
*
* @apiErrorExample
* HTTP/1.1 4xx OK
* {"success":false,"faultcode":"server00","faultstring":"Server Error: AMDA Login procedure failed"}
*/
require_once '../config.php';
$amda_ws = new WebServer();
$result = $amda_ws->getTimeTablesList($_GET);
if ($result['success'])
{
echo $result['TimeTablesList'];
}
else
{
echo $result['message'];
}
?>