mining ledger helper

This commit is contained in:
2019-09-09 20:23:59 -05:00
parent fa4f642498
commit ae87e5b01b
5 changed files with 235 additions and 0 deletions
+27
View File
@@ -172,6 +172,33 @@ class Esi {
return $token->refresh_token;
}
public function SetupEsiAuthentication($token = null) {
//Get the platform configuration
$config = config('esi');
//Declare some variables
$authentication = null;
if($token === null) {
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
]);
} else {
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token,
]);
}
//Setup the esi variable
$esi = new Eseye($authentication);
//Return the created variable
return $esi;
}
}
?>