This package was rapidly developed for my personal needs, but since I didn't found any similar package I've decided to publish it so anyone can use it. I am sorry for the poor documentation, once I get some time I will do some updates and provide with actual examples of how to use this package. In the meanwhile, you need to find your way through by reading my code 😁
You can install the package via composer:
composer require deko96/auth-gg-laravel
The Wrapper is depending on 4 parameters which can be configured through:
- Environment Variables
AUTHGG_AUTHORIZATION=
AUTHGG_SECRET=
AUTHGG_AID=
AUTHGG_API_KEY=
- Config file (config/auth-gg.php)
return [
'authorization' => env('AUTHGG_AUTHORIZATION', ''),
'secret' => env('AUTHGG_SECRET', ''),
'aid' => env('AUTHGG_AID', ''),
'apikey' => env('AUTHGG_API_KEY', '')
];
The config file can be published using the vendor:publish
artisan command.
php artisan vendor:publish --provider="Deko96\AuthGG\AuthGGServiceProvider" --tag="config"
Please note that all of the functions parameters are taken from the auth.gg developer documentation.
use Deko96\AuthGG\AuthGG;
class SomeController extends Controller {
// ...
public function index(AuthGG $authGG) {
$adminAPI = $authGG->admin();
$universalAPI = $authGG->universal();
// Users - https://setup.auth.gg/admin/users
$users = $adminAPI->users([
'type' => 'fetchall'
]);
// The rest of the examples coming soon.
}
// ...
}
Wanna contribute? Feel free to make a pull request 🍺
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate ❤️