From 0384aa9aa5a6c0ba754fde270ab2717af36b9d58 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 7 May 2013 10:39:06 -0700 Subject: [PATCH] Method stubs for Client object --- src/GeoIP2/Webservice/Client.php | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/GeoIP2/Webservice/Client.php b/src/GeoIP2/Webservice/Client.php index b76d44a..84092ca 100644 --- a/src/GeoIP2/Webservice/Client.php +++ b/src/GeoIP2/Webservice/Client.php @@ -13,4 +13,54 @@ use GeoIP2\Model\Omni; class Client { + private $user_id; + private $license_key; + + function __construct($user_id, $license_key) + { + $this->user_id = $user_id; + $this->license_key = $license_key; + } + + public function city($ip_address = 'me') + { + return $this->response_for('city', $ip_address); + } + + public function country($ip_address = 'me') + { + return $this->response_for('country', $ip_address); + } + + public function cityISPOrg($ip_address = 'me') + { + return $this->response_for('city_isp_org', $ip_address); + } + + public function omni($ip_address = 'me') + { + return $this->response_for('omni', $ip_address); + } + + private function response_for($path, $ip_address) + { + + } + + private function handle_success($response, $uri) + { + } + + private function handle_error($response, $uri) + { + } + + private function handle_4xx($response, $uri) + { + } + + private function handle_5xx($response, $uri) + { + } + } \ No newline at end of file