test data

This commit is contained in:
2021-02-13 17:17:14 +09:00
parent d1aadb1f2d
commit 3231c4c1aa
2 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
<?php
namespace App\Console\Commands\Data;
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
//Models
use App\Models\ScheduledTask\ScheduleJob;
//Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
class Test extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:test';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Test ESI stuff.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
//Declare some variables
$esiHelper = new Esi;
$config = config('esi');
//Get the ESI Token
$token = $esiHelper->GetRefreshToken($config['primary']);
$esi = $esiHelper->SetupAuthenticationToken($token);
try {
$stuff = $esi->invoke('get', '/corporations/{corporation_id}/wallets/{division}/journal/', [
'corporation_id' => $config['corporation'],
'division' => 1,
]);
} catch(RequestFailedException $e) {
dd($e);
}
dd($stuff);
}
}

View File

@@ -24,6 +24,7 @@ class Kernel extends ConsoleKernel
Commands\Data\EmptyJumpBridges::class,
Commands\Data\CleanStaleDataCommand::class,
Commands\Data\GetCorpsCommand::class,
Commands\Data\Test::class,
/**
* Assets Commands
*/