banckle/helpdesk-bundle

This is a symfony2 bundle to use Banckle.Helpdesk SDK for PHP in symfony2 applications quickly and easily.

dev-master 2014-11-13 09:02 UTC

This package is not auto-updated.

Last update: 2024-05-07 07:20:06 UTC


README

#Banckle.Helpdesk for Symfony

This bundle allows you to work with Banckle.Helpdesk SDK in your Symfony applications quickly and easily.

Installation

Add the following lines to your composer.json file:

// composer.json
{
    // ...
    require: {
        // ..
        "banckle/helpdesk-sdk-php": "dev-master",
        "banckle/helpdesk-bundle": "dev-master"

    }
}

Now, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located.

    composer update

Update your AppKernel.php file, and register the new bundle:

// app/AppKernel.php
public function registerBundles()
{
    // ...
     new Banckle\Bundle\HelpdeskBundle\BanckleHelpdeskBundle(),
    // ...
);
}

Configuration

Add this to your config.yml:

banckle_helpdesk:
    #(Required) Your Account apiKey from apps.banckle.com
    apiKey: "XXXXXXXXXXXXX"
    banckleAccountUri: "https://apps.banckle.com/api/v2"
    banckleHelpdeskUri: "https://helpdesk.banckle.com/public/api/v1"

Usage

The Bundle is called as a standard service.

To access service:
$bancklehelpdesk = $this->get('bancklehelpdesk.api');

To generate token:
$bancklehelpdesk = $this->get('bancklehelpdesk.api');
$token = $bancklehelpdesk->getToken($email, $password);

To get all contacts:
$contacts = $bancklehelpdesk->createInstance('ContactsApi', $token);
$result = $contacts->getContacts();