forked from La_Bureautique/zeg1jeux
57 lines
886 B
PHP
57 lines
886 B
PHP
<?php
|
|
/**
|
|
* https://github.com/duniter/cesium-plus-pod/blob/master/src/site/markdown/REST_API.md
|
|
*/
|
|
|
|
require_once('DAO.class.php');
|
|
|
|
class CesiumPlus {
|
|
|
|
private $dao;
|
|
|
|
public function __construct () {
|
|
|
|
$this->dao = DAO::getInstance();
|
|
}
|
|
|
|
public function
|
|
/*
|
|
public function getNearbyUsers ($lat, $lon, $radius) {
|
|
|
|
$n = 15;
|
|
|
|
$queryParams = [
|
|
'size' => $n,
|
|
|
|
'query' => [
|
|
'bool' => [
|
|
'must' => [
|
|
[
|
|
'geo_distance' => [
|
|
|
|
"distance" => $radius . 'km',
|
|
"geoPoint"=> [
|
|
"lat" => $lat,
|
|
"lon" => $lon
|
|
]
|
|
]
|
|
]
|
|
]
|
|
]
|
|
],
|
|
|
|
"sort" => [
|
|
[ "time" => ["order" => "desc"] ],
|
|
"_score"
|
|
]
|
|
|
|
];
|
|
|
|
$json = $this->dao->fetchJson('/user/profile/_search?pretty', 'gchange', $queryParams);
|
|
$result = json_decode($json);
|
|
|
|
return $result->hits->hits;
|
|
}
|
|
*/
|
|
}
|