Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
Kejax committed Mar 29, 2024
1 parent 877303f commit 6ba9c37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ If you want to contribute features to the API, just fork the repository and open

## Todos
- Add SwaggerUI and OpenAPI docs
- Add history of Major Orders
- Add history of Planet Defend Missions
- Add history of War Summary

## License
This project is provided under the MIT license, which allows you to do all kind of stuff that you want to do, as long as you include the copyright and the LICENSE in your copy
9 changes: 6 additions & 3 deletions routes/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;

/*
|--------------------------------------------------------------------------
Expand All @@ -23,11 +24,11 @@

Artisan::command('fetch', function () {
// Get current War ID
$warIdRequest = Http::get('https://api.live.prod.thehelldiversgame.com/api/WarSeason/current/'); // TODO
$warIdRequest = Http::get('https://api.live.prod.thehelldiversgame.com/api/WarSeason/current/WarId'); // TODO

$currentWarId = 801; // TODO
$currentWarId = $warIdRequest->json()['id'];

$planetRequest = Http::get('https://api.live.prod.thehelldiversgame.com/api/WarSeason/801/Status');
$planetRequest = Http::get("https://api.live.prod.thehelldiversgame.com/api/WarSeason/$currentWarId/Status");

if ($planetRequest->successful()) {
$data = $planetRequest->json();
Expand All @@ -47,6 +48,8 @@
$history->touch();
} else {
PlanetHistory::create($planet);
Log::debug($history);
Log::debug(print_r($planet));
}
}

Expand Down

0 comments on commit 6ba9c37

Please sign in to comment.