Esempio n. 1
0
 public function request($request)
 {
     $curl = new \Api\Curl\Client();
     $response = $curl->get('http://bie.ala.org.au/ws/species/' . $request['guid']);
     $this->_status = $response->status;
     $this->body = $response->body;
 }
Esempio n. 2
0
 public function request($names)
 {
     $curl = new \Api\Curl\Client();
     $response = $curl->post('http://bie.ala.org.au/ws/species/lookup/bulk', null, array('names' => $names));
     $this->_status = $response->status;
     $this->body = $response->body;
 }
Esempio n. 3
0
 public function get($request)
 {
     $curl = new \Api\Curl\Client();
     $response = $curl->get('http://biocache.ala.org.au/ws/occurrence/facets', array('q' => $this->buildQ($request['bname']), 'facets' => 'taxon_name', 'lat' => $request['lat'], 'lon' => $request['lon'], 'radius' => $request['radius']));
     $this->status = $response->status;
     $this->body = $response->body;
 }
Esempio n. 4
0
 /**
  * Region request (wkt polygon + occurence cache request)
  * @see \Api\Ala\Occurences\Region
  * @param array $request $_GET: required fields: q
  * @param string $qid occurence query cache id, provided by http://biocache.ala.org.au/ws/webportal/params
  */
 public function qidRequest($request, $qid)
 {
     $curl = new \Api\Curl\Client();
     $response = $curl->get('http://biocache.ala.org.au/ws/occurrences/search', array('q' => 'qid:' . $qid, 'fq' => $this->buildQ($request['bname'])));
     $this->_status = $response->status;
     $this->body = $response->body;
 }
Esempio n. 5
0
 public function request($request)
 {
     // case: module included in occurence aggregator (POST)
     if (isset($request['wkt'])) {
         $this->_status = 400;
         $this->count = false;
         $this->_errors[] = 'No polygon requests supported';
         return;
     }
     $curl = new \Api\Curl\Client();
     $response = $curl->get('http://biocache.ala.org.au/ws/explore/groups', array('lat' => $request['lat'], 'lon' => $request['lon'], 'radius' => $request['radius']));
     $this->_status = $response->status;
     $this->body = $response->body;
 }
Esempio n. 6
0
 public function request($request)
 {
     // case: module included in occurence aggregator (POST)
     if (isset($request['wkt'])) {
         $this->_status = 400;
         $this->count = false;
         $this->_errors[] = 'No polygon requests supported';
         return;
     }
     $request['group_name'] = !empty($request['group_name']) ? $request['group_name'] : null;
     $group = $this->validateGroupName($request['group_name']);
     if (!$group) {
         $this->_status = 400;
         $this->_errors[] = 'Invalid group name';
         return;
     }
     $curl = new \Api\Curl\Client();
     $response = $curl->get('http://biocache.ala.org.au/ws/explore/counts/group/' . ucfirst($request['group_name']), array('lat' => $request['lat'], 'lon' => $request['lon'], 'radius' => $request['radius']));
     $this->_status = $response->status;
     $this->body = $response->body;
 }
Esempio n. 7
0
 /**
  * Occurence query cache request
  */
 public function paramsCacheQuery($request)
 {
     $curl = new \Api\Curl\Client();
     $response = $curl->post('http://biocache.ala.org.au/ws/webportal/params', null, array('wkt' => $request['wkt']), false);
     return $response;
 }