Commit 0735aa6e5697e267259e4362af43d5e9e48378a1
1 parent
dd38e2e4
Exists in
master
and in
9 other branches
correct json keys : hapi
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
src/DDSERVICES/HAPI/info.php
... | ... | @@ -40,13 +40,13 @@ |
40 | 40 | |
41 | 41 | $parameters = $dataset->getElementsByTagName('Parameter'); |
42 | 42 | if ( $parameters->length == 0 ) { |
43 | - $response["status"] = array("code" => 404, "msg" => "NO PARAMETERS"); | |
43 | + $response["status"] = array("code" => 404, "message" => "NO PARAMETERS"); | |
44 | 44 | exit(json_encode($response)); |
45 | 45 | } |
46 | 46 | |
47 | 47 | $paramDom = new DomDocument("1.0"); |
48 | 48 | |
49 | - $parametersResponse = array(array("name" => "Time", "type" => "isotime")); | |
49 | + $parametersResponse = array(array("name" => "Time", "type" => "isotime", "length" => 17, "units" => "", "fill" =>"")); | |
50 | 50 | foreach ( $parameters as $param ) { |
51 | 51 | $oneParam = array(); |
52 | 52 | $oneParam["name"] = $param->getElementsByTagName('Name')->item(0)->nodeValue; |
... | ... | @@ -57,15 +57,15 @@ |
57 | 57 | $process = $paramDom->getElementsByTagName("process")->item(0)->nodeValue; |
58 | 58 | if (!$process) { |
59 | 59 | $oneParam["description"] = $param->getElementsByTagName('Description')->item(0)->nodeValue; |
60 | - $oneParam["fillvalue"] = $param->getElementsByTagName('FillValue')->item(0)->nodeValue; | |
60 | + $oneParam["fill"] = $param->getElementsByTagName('FillValue')->item(0)->nodeValue; | |
61 | 61 | $oneParam["units"] = $param->getElementsByTagName('Units')->item(0)->nodeValue; |
62 | 62 | $parametersResponse[] = $oneParam; |
63 | 63 | } |
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
67 | - $response["start"] = $dataset->getElementsByTagName('StartDate')->item(0)->nodeValue; | |
68 | - $response["stop"] = $dataset->getElementsByTagName('StopDate')->item(0)->nodeValue; | |
67 | + $response["startDate"] = $dataset->getElementsByTagName('StartDate')->item(0)->nodeValue; | |
68 | + $response["stopDate"] = $dataset->getElementsByTagName('StopDate')->item(0)->nodeValue; | |
69 | 69 | $response["cadence"] = $dataset->getElementsByTagName('Cadence')->item(0)->nodeValue; |
70 | 70 | $response["parameters"] = $parametersResponse; |
71 | 71 | $response["status"] = array("code" => 1200, "msg" => "OK"); | ... | ... |