Skip to content

Commit

Permalink
refactor: remove bookmarks feature
Browse files Browse the repository at this point in the history
since there are no longer ways to collect bookmarks and esi seems frozen for now, remove bookmark feature and its dependencies.

Closes eveseat/seat#695
  • Loading branch information
warlof committed Dec 12, 2020
1 parent a9c4eca commit 9aa421b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 149 deletions.
42 changes: 0 additions & 42 deletions src/Http/Controllers/Api/v2/CharacterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
namespace Seat\Api\Http\Controllers\Api\v2;

use Illuminate\Http\Resources\Json\Resource;
use Seat\Api\Http\Resources\BookmarkResource;
use Seat\Api\Http\Resources\CharacterSheetResource;
use Seat\Api\Http\Resources\ContactResource;
use Seat\Api\Http\Resources\ContractResource;
Expand All @@ -33,7 +32,6 @@
use Seat\Api\Http\Resources\MailResource;
use Seat\Api\Http\Resources\NotificationResource;
use Seat\Eveapi\Models\Assets\CharacterAsset;
use Seat\Eveapi\Models\Bookmarks\CharacterBookmark;
use Seat\Eveapi\Models\Character\CharacterCorporationHistory;
use Seat\Eveapi\Models\Character\CharacterInfo;
use Seat\Eveapi\Models\Character\CharacterNotification;
Expand Down Expand Up @@ -123,46 +121,6 @@ public function getAssets(int $character_id)
return Resource::collection($query->paginate());
}

/**
* @OA\Get(
* path="/v2/character/bookmarks/{character_id}",
* tags={"Bookmarks"},
* summary="Get a paginated list of bookmarks for a character",
* description="Returns a list of bookmarks",
* security={
* {"ApiKeyAuth": {}}
* },
* @OA\Parameter(
* name="character_id",
* description="Character id",
* required=true,
* @OA\Schema(
* type="integer"
* ),
* in="path"
* ),
* @OA\Response(response=200, description="Successful operation",
* @OA\JsonContent(
* type="object",
* @OA\Property(
* type="array",
* property="data",
* @OA\Items(ref="#/components/schemas/CharacterBookmark")
* )
* )
* ),
* @OA\Response(response=400, description="Bad request"),
* @OA\Response(response=401, description="Unauthorized"),
* )
*
* @param int $chacter_id
*/
public function getBookmarks(int $character_id)
{

return BookmarkResource::collection(CharacterBookmark::where('character_id', $character_id)->get());
}

/**
* @OA\Get(
* path="/v2/character/contacts/{character_id}",
Expand Down
44 changes: 0 additions & 44 deletions src/Http/Controllers/Api/v2/CorporationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
namespace Seat\Api\Http\Controllers\Api\v2;

use Illuminate\Http\Resources\Json\Resource;
use Seat\Api\Http\Resources\BookmarkResource;
use Seat\Api\Http\Resources\ContactResource;
use Seat\Api\Http\Resources\ContractResource;
use Seat\Api\Http\Resources\CorporationSheetResource;
use Seat\Api\Http\Resources\IndustryResource;
use Seat\Api\Http\Resources\MemberTrackingResource;
use Seat\Eveapi\Models\Assets\CorporationAsset;
use Seat\Eveapi\Models\Bookmarks\CorporationBookmark;
use Seat\Eveapi\Models\Contacts\CorporationContact;
use Seat\Eveapi\Models\Contracts\CorporationContract;
use Seat\Eveapi\Models\Corporation\CorporationInfo;
Expand Down Expand Up @@ -113,48 +111,6 @@ public function getAssets(int $corporation_id)
return Resource::collection($query->paginate());
}

/**
* @OA\Get(
* path="/v2/corporation/bookmarks/{corporation_id}",
* tags={"Bookmarks"},
* summary="Get a list of bookmarks for a corporation",
* description="Returns a list of bookmarks",
* security={
* {"ApiKeyAuth": {}}
* },
* @OA\Parameter(
* name="corporation_id",
* description="Corporation id",
* required=true,
* @OA\Schema(
* type="integer"
* ),
* in="path"
* ),
* @OA\Response(response=200, description="Successful operation",
* @OA\JsonContent(
* type="object",
* @OA\Property(
* type="array",
* property="data",
* @OA\Items(ref="#/components/schemas/CorporationBookmark")
* )
* )
* ),
* @OA\Response(response=400, description="Bad request"),
* @OA\Response(response=401, description="Unauthorized"),
* )
*
* @param int $corporation_id
*
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
*/
public function getBookmarks(int $corporation_id)
{

return BookmarkResource::collection(CorporationBookmark::where('corporation_id', $corporation_id)->get());
}

/**
* @OA\Get(
* path="/v2/corporation/contacts/{corporation_id}",
Expand Down
61 changes: 0 additions & 61 deletions src/Http/Resources/BookmarkResource.php

This file was deleted.

2 changes: 0 additions & 2 deletions src/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
Route::group(['prefix' => 'character'], function () {

Route::get('/assets/{character_id}')->uses('CharacterController@getAssets');
Route::get('/bookmarks/{character_id}')->uses('CharacterController@getBookmarks');
Route::get('/contacts/{character_id}')->uses('CharacterController@getContacts');
Route::get('/industry/{character_id}')->uses('CharacterController@getIndustry');
Route::get('/killmails/{character_id}/{killmail_id?}')->uses('KillmailsController@getCharacterKillmails');
Expand All @@ -125,7 +124,6 @@
Route::group(['prefix' => 'corporation'], function () {

Route::get('/assets/{corporation_id}')->uses('CorporationController@getAssets');
Route::get('/bookmarks/{corporation_id}')->uses('CorporationController@getBookmarks');
Route::get('/contacts/{corporation_id}')->uses('CorporationController@getContacts');
Route::get('/contracts/{corporation_id}')->uses('CorporationController@getContracts');
Route::get('/industry/{corporation_id}')->uses('CorporationController@getIndustry');
Expand Down

0 comments on commit 9aa421b

Please sign in to comment.