Skip to content

Commit

Permalink
feat: uprev various endpoints (#318)
Browse files Browse the repository at this point in the history
* fix: simple version bumps
* fix: version_check only look at _latest
* fix: missing closing quote
* fix: revert char location update to dev endpoint
* fix: uprev character affilliations endpoint
* fix: begin uprev of corp structures to v4
* style: make styleci happy
* fix: reduce rename structure complexity
* remove version check py
  • Loading branch information
Crypta-Eve authored Dec 6, 2021
1 parent ebf5858 commit 76b7040
Show file tree
Hide file tree
Showing 30 changed files with 47 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/Jobs/Character/Affiliation.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Affiliation extends EsiBase
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var array
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/AgentsResearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AgentsResearch extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/Blueprints.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Blueprints extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v2';
protected $version = 'v3';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/CorporationHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CorporationHistory extends AbstractCharacterJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var array
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/Fatigue.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Fatigue extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/Medals.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Medals extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Roles extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v2';
protected $version = 'v3';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/Standings.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Standings extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Character/Titles.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Titles extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/AllianceHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AllianceHistory extends AbstractCorporationJob
/**
* @var string
*/
protected $version = 'v2';
protected $version = 'v3';

/**
* @var array
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Blueprints.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Blueprints extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v2';
protected $version = 'v3';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/ContainerLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ContainerLogs extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v2';
protected $version = 'v3';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Divisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Divisions extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Facilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Facilities extends AbstractAuthCorporationJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Info extends AbstractCorporationJob
/**
* @var string
*/
protected $version = 'v4';
protected $version = 'v5';

/**
* @var array
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/IssuedMedals.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class IssuedMedals extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Medals.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Medals extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* TODO: Add a local override property as this scope
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/MemberTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MemberTracking extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Members.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Members extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v3';
protected $version = 'v4';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/MembersLimit.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MembersLimit extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/MembersTitles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MembersTitles extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/RoleHistories.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RoleHistories extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Roles extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Standings.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Standings extends AbstractAuthCorporationJob
/**
* @var int
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/StarbaseDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class StarbaseDetails extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Starbases.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Starbases extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
27 changes: 19 additions & 8 deletions src/Jobs/Corporation/Structures.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Structures extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v3';
protected $version = 'v4';

/**
* @var string
Expand Down Expand Up @@ -115,15 +115,26 @@ public function handle()
// but this will update when that models updater runs.
$model = UniverseStructure::firstOrNew([
'structure_id' => $structure->structure_id,
])->fill([
'solar_system_id' => $structure->system_id,
'type_id' => $structure->type_id,
'name' => 'Unknown Structure',
'x' => 0.0,
'y' => 0.0,
'z' => 0.0,
]);

// Persist the structure only if it doesn't already exist
if (! $model->exists) {
$model->fill([
'solar_system_id' => $structure->system_id,
'type_id' => $structure->type_id,
'name' => $structure->name,
'x' => 0.0,
'y' => 0.0,
'z' => 0.0,
])->save();
}

if ($model->name != $structure->name) {
$model->fill([
'name' => $structure->name,
])->save();
}

// Persist the structure only if it doesn't already exists
if (! $model->exists) $model->save();

Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Corporation/Titles.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Titles extends AbstractAuthCorporationJob
/**
* @var string
*/
protected $version = 'v1';
protected $version = 'v2';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/Location/Character/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Location extends AbstractAuthCharacterJob
/**
* @var int
*/
protected $version = 'v2';
protected $version = 'v1';

/**
* @var string
Expand Down
1 change: 0 additions & 1 deletion src/Mapping/Structures/CorporationStructureMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class CorporationStructureMapping extends DataMapping
'state_timer_end' => 'state_timer_end',
'unanchors_at' => 'unanchors_at',
'state' => 'state',
'reinforce_weekday' => 'reinforce_weekday',
'reinforce_hour' => 'reinforce_hour',
'next_reinforce_weekday' => 'next_reinforce_weekday',
'next_reinforce_hour' => 'next_reinforce_hour',
Expand Down

0 comments on commit 76b7040

Please sign in to comment.