/** * Update Global City status * * @param unknown_type $id * @param unknown_type $status * @return mixed */ public function updateGlobalCityStatus($id, $status) { $response = $this->request->post($this->chromediaApiUri . "/cities/{$id}/update-status", array('status' => $status)); if (200 != $response->getStatusCode()) { throw LocationServiceException::failedApiRequest($response->getRequest()->getUrl(false), $response->getReasonPhrase()); } return \json_decode($response->getBody(true), true); }
/** * Find user/s in chromedia global accounts based on searchBy options * * @param array $searchBy * @param array $options * @return array */ public function find($searchBy, $options) { $response = $this->request->post($this->chromediaAccountsUri . '/find', array('searchBy' => \base64_encode(\json_encode($searchBy)), 'option' => \base64_encode(\json_encode($options)))); if (200 == $response->getStatusCode()) { $json_data = \json_decode($response->getBody(true), true); return $json_data; } else { throw new FailedAccountRequestException($response->getBody(true)); } }