econtract/toolbox

E-Contract BVBA toolbox API package

3.0.0 2022-04-01 12:17 UTC

This package is auto-updated.

Last update: 2024-11-29 06:29:25 UTC


README

This package offers the integration of the econtract Toolbox API. This API can be used by partners and affiliates of econtract to leverage various services and utility resources owned by econtract on their own websites.

Installation

Pull this package in through Composer:

    {
        "require": {
            "econtract/toolbox": "3.*"
        }
    }

Next, you will need to add several values to your .env file:


    TOOLBOX_API_ENDPOINT=https://toolbox.econtract.be       // Toolbox API key URL that is to be used
    TOOLBOX_API_KEY=your_toolbox_key                        // Toolbox API key that will authenticate you in our system.

In order to use the API (and thus this package), an API key is required. If you are in need of such a key, please get in touch with Aanbieders.be via their website.

Laravel installation

Add the service provider to your config/app.php file:

    'providers'             => array(

        //...
        \Econtract\Toolbox\ToolboxServiceProvider::class,

    ),

Add the API as an alias to your config/app.php file

    'facades'               => array(

        //...
        'Toolbox'               => \Econtract\Toolbox\Facades\Toolbox::class,

    ),

Usage

Laravel usage

You can access the API using the alias you have selected in your config/app.php file:

    
    $cities = Toolbox::getCities(
        array(
            'query'     => 'Kort',
        )
    );

    $city = Toolbox::getCity( $id );

    $addresses = Toolbox::getAddresses(
        array(
            'street'        => 'markt',
            'postcode'      => '350',
            'city'          => 'ru',
        )
    );

For information regarding all possible parameters and their properties, we kindly refer you to the API documentation.

Non-laravel usage

    include('vendor/autoload.php');

    use Econtract/Toolbox/ToolboxService;


    $dotenv = new Dotenv\Dotenv(__DIR__);
    $dotenv->load();


    $toolboxService = new ToolboxService();
    $toolboxService->getAddresses(
        array(
            'street'        => 'markt',
            'postcode'      => '350',
            'city'          => 'ru',
        )
    );

License

This package is proprietary software and may not be copied or redistributed without explicit permission.

Contact

Charles Dekkers (owner)

Jan Oris (developer)