2017 © Pedro Peláez
 

library freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

image

mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  • Monday, November 13, 2017
  • by hilenium
  • Repository
  • 4 Watchers
  • 17 Stars
  • 35,763 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 14 Forks
  • 9 Open issues
  • 12 Versions
  • 22 % Grown

The README.md

Freshdesk PHP SDK API v2

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

This is a PHP 5.5+ SDK for the Freshdesk API v2., (*2)

If you have questions, please contact me or open an issue on GitHub., (*3)

Quick Start

require __DIR__ . '/vendor/autoload.php';
use \Freshdesk\Api;

$api = new Api("your_freshdesk_api_key", "your_freshdesk_domain");

$all = $api->tickets->all();
$some = $api->tickets->all(['page' => 2]);
$new = $api->tickets->create($data);
$updated = $api->tickets->update($data);
$api->tickets->delete($id);
$existing = $api->tickets->view($id);

//Responses are simple arrays, e.g.:
$id = $existing['id'];
$first = $all[0];

Framework Integration

Installation

To integrate this library into your application, use Composer., (*4)

Add mpclarkson/freshdesk-php-sdk to your composer.json file:, (*5)

{
    "require": {
        "mpclarkson/freshdesk-php-sdk": "dev-master"
    }
}

Then run:, (*6)

php composer.phar install

API Overview

Full documentation is available here, (*7)

Getting started

Creating a new API instance is very easy. All you need is your Freshdesk API key and your Freshdesk domain., (*8)

require __DIR__ . '/vendor/autoload.php';
use \Freshdesk\Api;

$api = new Api("your_freshdesk_api_key", "your_freshdesk_domain");

Resources

The available methods for each resource are available via a public property on the api, for example:, (*9)

//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();

Responses

All responses are arrays of data. Please refer to Freshdesk's documentation for further information., (*10)

Filtering

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

//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., (*12)

Contributing

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

Nearly all api calls are available except for the Solutions and Surveys, which Freshdesk has not yet implemented., (*14)

  • [ ] Solutions
  • [ ] Surveys
  • [ ] Uploading files is not yet supported
  • [ ] More tests. You can never have enough!
  • [ ] Nicer documentation

Author

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

Reference

The Versions

13/11 2017

dev-master

9999999-dev https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

api support help desk freshdesk customer service

08/09 2016

0.3.1

0.3.1.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

api support help desk freshdesk customer service

13/08 2016

0.3.0

0.3.0.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

api support help desk freshdesk customer service

05/08 2016

0.2.6

0.2.6.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

api support help desk freshdesk customer service

22/04 2016

0.2.5

0.2.5.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

api support help desk freshdesk customer service

22/04 2016

0.2.4

0.2.4.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

MIT

The Requires

 

The Development Requires

api support help desk freshdesk customer service

22/04 2016

0.2.3

0.2.3.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api support helpdesk freshdesk customer service

21/04 2016

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api support helpdesk freshdesk customer service

21/04 2016

0.2.1

0.2.1.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api support helpdesk freshdesk customer service

21/04 2016

0.1.1

0.1.1.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api support helpdesk freshdesk customer service

21/04 2016

0.2.0

0.2.0.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api support helpdesk freshdesk customer service

21/04 2016

0.1.0

0.1.0.0 https://github.com/mpclarkson/freshdesk-php-sdk

PHP SDK for the Freshdesk API (v2)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api support helpdesk freshdesk customer service