entity stuff for blacklist'
This commit is contained in:
@@ -310,13 +310,13 @@ class LookupHelper {
|
|||||||
public function CorporationNameToId($corpName) {
|
public function CorporationNameToId($corpName) {
|
||||||
//Check if the corporation is stored in our own database first
|
//Check if the corporation is stored in our own database first
|
||||||
$corp = $this->LookupCorporation(null, $corpName);
|
$corp = $this->LookupCorporation(null, $corpName);
|
||||||
dd($corp);
|
|
||||||
if($corp != null) {
|
if($corp != null) {
|
||||||
return $corp->corporation_id;
|
return $corp->corporation_id;
|
||||||
} else {
|
} else {
|
||||||
//Try to get the corporation details from ESI
|
//Try to get the corporation details from ESI
|
||||||
try {
|
try {
|
||||||
$corporation = $this->esi->setBody(array(
|
$response = $this->esi->setBody(array(
|
||||||
$corpName,
|
$corpName,
|
||||||
))->invoke('post', '/universe/ids/');
|
))->invoke('post', '/universe/ids/');
|
||||||
} catch(RequestFailedException $e) {
|
} catch(RequestFailedException $e) {
|
||||||
@@ -324,6 +324,8 @@ class LookupHelper {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dd($response);
|
||||||
|
|
||||||
if(isset($response->corporations[0]->id)) {
|
if(isset($response->corporations[0]->id)) {
|
||||||
$this->StoreCorporationLookup($response->corporations[0]->id, null);
|
$this->StoreCorporationLookup($response->corporations[0]->id, null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user