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; }
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; }
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; }
/** * 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; }
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; }
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; }
/** * 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; }