Skip to content

Commit

Permalink
Merge pull request #7104 from Webmecanik/add-mapping-extremiplookup
Browse files Browse the repository at this point in the history
Add company mapping and api key for ExtremeIpLookup
  • Loading branch information
alanhartless committed Jan 30, 2019
2 parents 0d94136 + 935576e commit a426db2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/bundles/CoreBundle/IpLookup/ExtremeIpLookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public function getAttribution()
*/
protected function getUrl()
{
return 'https://extreme-ip-lookup.com/json/'.$this->ip;
$auth = !empty($this->auth) ? '?key='.$this->auth : '';

return 'https://extreme-ip-lookup.com/json/'.$this->ip.$auth;
}

/**
Expand All @@ -52,6 +54,9 @@ protected function parseResponse($response)
case 'city':
$key = 'city';
break;
case 'businessName':
$key = 'organization';
break;
}

$this->$key = $value;
Expand Down

0 comments on commit a426db2

Please sign in to comment.