RickardAhlstedt / GleSYS-laravel

Laravel-package for integrating GleSYS-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GleSYS-API wrapper for Laravel

Latest Version on Packagist Total Downloads

A simple wrapper for the GleSYS API.

Installation

You can install the package via composer:

composer require dronki/glesys-laravel
php artisan vendor:publish --provider="Dronki\GlesysLaravel\GlesysLaravelServiceProvider"

Register the service-provider in your config/app.php file:

'providers' => [
    ...
    Dronki\GlesysLaravel\GlesysLaravelServiceProvider::class,
],

Usage

The wrapper is written in such a way that it can be used in any Laravel application.
By using the facade, you can access the API in a simple way:

GleSYS::punyEncode( 'www.example.com' );

Available methos

#General
GleSYS::getResponse(); // Gets the response from the last request
GleSYS::punyEncode( $string ); // Puny-encodes a string
GleSYS::punyDecode( $string ); // Puny-decodes a string

# Email
GleSYS::emailOverview(); // Gets a list of all email-accounts and aliases
GleSYS::emailsByDomain( $domain, $filter = '', $objects = false ); // Gets a list of all email-accounts and aliases for a domain, optionally filtered by $filter, and optionally return objects instead of arrays
GleSYS::emailCreateAccount( $email, $password, $settings = [] ); // Creates a new email-account
GleSYS::emailEditAccount( $email, $settings = [] ); // Edits an existing email-account
GleSYS::emailDeleteAccount( $email ); // Deletes an email-account
GleSYS::emailAccountQuota( $email ); // Gets the quota of an email-account

# Aliases for email-account
GleSYS::emailCreateAlias( $alias, $recipient ); // Creates a new alias for an email-account
GleSYS::emailEditAlias( $alias, $recipient ); // Edits an existing alias for an email-account
GleSYS::emailDeleteAlias( $alias ); // Deletes an alias for an email-account

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email rickard@ahlstedt.xyz instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Donations

If you like this package and would like to support my work, consider donating.

Donate to Dronki Donate with crypto

About

Laravel-package for integrating GleSYS-API

License:MIT License


Languages

Language:PHP 100.0%