2017 © Pedro Peláez
 

symfony-bundle freshdesk-bundle

Symfony bundle for the Freshdesk API (v2)

image

mpclarkson/freshdesk-bundle

Symfony bundle for the Freshdesk API (v2)

  • Wednesday, August 24, 2016
  • by hilenium
  • Repository
  • 1 Watchers
  • 5 Stars
  • 6,865 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

FreshdeskBundle

Build Status Scrutinizer Code Quality SensioLabsInsight Packagist, (*1)

This is a Symfony2-3 bundle to interact with the Freshdesk API v2 via the freshdesk-php-sdk., (*2)

Requirements

  • Symfony 2.8+
  • PHP 5.5+
  • A Freshdesk account

Installation

To add this bundle to your Symfony app, use Composer., (*3)

Add mpclarkson/freshdesk-bundle to your composer.json file:, (*4)

{
    "require": {
        "mpclarkson/freshdesk-bundle": "dev-master"
    }
}

Add the bundle to AppKernel.php:, (*5)

public function registerBundles()
{
    $bundles = array(
        // ...
            new Mpclarkson\FreshdeskBundle\FreshdeskBundle(),
        // ...
    );
}

Configure the bundle in config.yml:, (*6)

freshdesk:
    api_key: your_freshdesk__api_key
    domain: your_freshdesk_domain

Then run composer update., (*7)

Accessing the Freshdesk API

In a controller you can access the Freshdesk client and the API resources as follows:, (*8)

$api = $this->get('freshdesk');

//Contacts
$contacts = $api->contacts->update($contactId, $data);

//Agents
$me = $api->agents->current();

//Companies
$company = $api->companies->create($data);

//Groups
$deleted = $api->groups->delete($groupId);

//Tickets
$ticket = $api->tickets->view($filters);

//Time Entries
$time = $api->timeEntries->all($ticket['id']);

//Conversations
$ticket = $api->conversations->note($ticketId, $data);

//Categories
$newCategory = $api->categories->create($data);

//Forums
$forum = $api->forums->create($categoryId, $data);

//Topics
$topics = $api->topics->monitor($topicId, $userId);

//Comments
$comment = $api->comments->create($forumId);

//Email Configs
$configs = $api->emailConfigs->all();

//Products
$product = $api->products->view($productId);

//Business Hours
$hours = $api->businessHours->all();

//SLA Policy
$policies = $api->slaPolicies-all();

Filtering

All GET requests accept an optional array $query parameter to filter results. For example:, (*9)

//Page 2 with 50 results per page
$page2 = $this->forums->all(['page' => 2, 'per_page' => 50]);

//Tickets for a specific customer
$tickets = $this->tickets->view(['company_id' => $companyId]);

Please read the Freshdesk documentation for further information on filtering GET requests., (*10)

Contributing

This is a work in progress and PRs are welcome. Please read the contributing guide., (*11)

Author

The library was written and maintained by Matthew Clarkson from Hilenium., (*12)

References

The Versions

24/08 2016

dev-master

9999999-dev https://github.com/mpclarkson/freshdesk-bundle

Symfony bundle for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony support help desk freshdesk

24/08 2016

0.3.0

0.3.0.0 https://github.com/mpclarkson/freshdesk-bundle

Symfony bundle for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony support help desk freshdesk

22/04 2016

0.2.1

0.2.1.0 https://github.com/mpclarkson/freshdesk-bundle

Symfony bundle for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony support help desk freshdesk

22/04 2016

0.2.0

0.2.0.0

Symfony bundle for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony support help desk freshdesk