fenix007/apiwrapper
Larablocks Analysis
fenix007/apiwrapper works with Laravel 5 (latest release v0.0.5, Jul 14, 2017), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Jul 14, 2017)
- 0 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jul 14, 2017.
- No releases in the last 12 months.
- First released: Jul 14, 2017.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require fenix007/apiwrapper |
|
| Latest Version: | v0.0.5 |
| Laravel: | 5 |
| License: | proprietary |
| Last Updated: | Jul 27, 2017 |
| Links: | GitHub · Packagist |
Description
A Laraval Api wrapper base package for fast build custom api wrapper
Package contain Abstract classes, which you need extended and some helper functions. Structure your package files so:
project
│ Client extends Fenix007\Wrapper\Client
│ Methods
| YourApiWrapperProvider
│
└───Api
│ YourTestMethodApi
│
└───config
| yourconfig.php override apiwrapper.php config
|
└───HttpClient
| HttpClient with getSecurityParamsToUri function
|
└───Mappers
| YourMapper extends Fenix007\Wrapper\Mappers\AbstractMapper
|
└───Models
YourModdel extends Fenix007\Wrapper\Models\AbstractModel
Your package provider return Client class which allow fast access to Api/classes functionality
All Api Methods you can describe in Methods class, like this:
<?php
namespace Siqwell\Eagle;
class Methods
{
const TRANSLATIONS_GET_LIST = ['method' => 'GET', 'path' => '/streaming/translations.json'];
const TRANSLATION_GET_INFO = ['method' => 'GET', 'path' => '/streaming/translations/{id}.json'];
}
In Api class you can do like this:
<?php
class RecordApi extends Fenix007\Wrapper\Api\AbstractApi
{
/**
* @param $id
* @throws \Exception
* @return \Siqwell\Eagle\Models\Record
* ID – идентификатор записи
*/
public function find($id) : ?Record
{
$parameters = [
'id' => $id
];
$result = $this->get(
Request::createFromMethod(Methods::RECORD_GET_INFO, $parameters),
RecordMapper::class
);
return $result;
}
}
So, in project you can use YourFacade::Record->find(1), which return RecordModel
Fot phpunit tests add folder in test/.../Api directory create TestCase class extended from \Fenix007\Wrapper\Tests\Api\TestCase
where you have to define $rootDir and $resourceDir folder, like:
<?php
namespace Siqwell\Eagle\Tests\Api;
class TestCase extends \Fenix007\Wrapper\Tests\Api\TestCase
{
const DYNAMIC_FIELDS = [
'current_screenshot',
'current_screenshot_small',
'screenshot',
'screenshot_small',
'view_count',
'updated_at'
];
protected $rootDir = ROOT_DIR;
protected $resourceDir = RESOURCES_DIR;
}
Extend API test classes in test/.../Api directory from this TestCase
For dummy json response use test/.../Resources directory and use directory structure like uri request
If you want to test from Resources dummy folder you need to pass test HttpClient in setUp method with createFakeHttpClient function:
<?php
protected function setUp()
{
parent::setUp();
//TODO: change on real API
$this->translationApi = new TranslationApi($this->createFakeHttpClient());
}
Related Packages
Laravel Package for Imgur API. Provides easy access to the adyg/php-imgur-api-cl...
Beautiful and simple Implementation to integrate Vicidial API
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| v0.0.5 | ^5.4 | proprietary | |
| v0.0.4 | ^5.4 | proprietary | |
| v0.0.3 | ^5.4 | proprietary | |
| v0.0.2 | ^5.4 | proprietary | |
| v0.0.1 | ^5.4 | proprietary |