upd: Postmessage channel emergency interop
This commit is contained in:
parent
3434ac229c
commit
cb5482950f
|
@ -17,16 +17,19 @@ class message
|
||||||
public function POST_emergency($argv){
|
public function POST_emergency($argv){
|
||||||
extract($argv);
|
extract($argv);
|
||||||
|
|
||||||
$wsi = new wsinterop("localhost",9997);
|
$wsi = new wsinterop("localhost",9998);
|
||||||
|
|
||||||
$wsi->send([
|
$wsi->send([
|
||||||
"operation" => "PostMessage",
|
"operation" => "PostMessage",
|
||||||
"message" => $message,
|
"message" => $message,
|
||||||
"username" => $username,
|
"username" => $username,
|
||||||
|
"location" => $location,
|
||||||
"channelType" => "Emergency",
|
"channelType" => "Emergency",
|
||||||
"channelName" => $URL_0
|
"channelName" => is_null($URL_0) ? "" : "$URL_0"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$wsi->close();
|
||||||
|
|
||||||
return ["sent" => true];
|
return ["sent" => true];
|
||||||
//TODO: tout poster dans la BDD
|
//TODO: tout poster dans la BDD
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"URL_0": {
|
"URL_0": {
|
||||||
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
|
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
|
||||||
"type" : "varchar(2,2)",
|
"type" : "numeric",
|
||||||
"optional" : true
|
"optional" : true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
"location": {
|
"location": {
|
||||||
"description": "coordonés GPS du message, des coordonnées invalide ne seront pas affiché",
|
"description": "coordonés GPS du message, des coordonnées invalide ne seront pas affiché",
|
||||||
"type": "array<float>"
|
"type": "array<numeric>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue