getTimeTable.php
1.22 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
<?php
/**
* @api {get} getTimeTable.php getTimeTable
* @apiDescription Provides the contents of a Time Table (TT).
* @apiName getTimeTable
* @apiGroup webservices
*
* @apiParam {String} ttID Identifier of the Time Table, the « getTimeTableList » service.
* @apiParam {String} [userID] Identifier of the user in AMDA (*mandatory for user owned data*)
* @apiParam {String} [password] Password of the user in AMDA (*mandatory for user owned data*)
*
* @apiSuccess {String} success `true`
* @apiSuccess {String} ttFileURL URL of the XML file containing the Time Table (VOTable format)
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* http://cdpp1.cesr.fr/AMDA/data/WSRESULT/getTimeTable_impex_sharedtt_0.xml
*
* @apiError {String} success `false`
* @apiError {String} faultcode The error code.
* @apiError {String} faultstring The error message.
*
* @apiErrorExample getTimeTable(ttID=sharedtt_0)
* HTTP/1.1 4xx OK
* {"success":false,"faultcode":"server00","faultstring":"Server error"}
*/
require_once '../config.php';
$amda_ws = new WebServer();
$result = $amda_ws->getTimeTable($_GET);
if ($result['success']){
echo $result['ttFileURL'];
}
else {
echo $result['message'];
}
?>