silktide / freshdesk-api
PHP API library for Freshdesk
Installs: 1 363
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 0
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ^6.1
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ^4.7
This package is not auto-updated.
Last update: 2020-01-20 21:27:26 UTC
README
A PHP API client for the Freshdesk API.
Installation
composer require silktide/freshdesk-api
Usage
This library was built with dependency injection (DI) in mind, but a factory is included for your convenience should you prefer.
With DI
The client class has 5 dependencies:
- Instance of
GuzzleHttp\Client
- Instance of
Silktide\FreshdeskApi\ResponseFactory
- Your Freshdesk domain (e.g. 'https://mydomain.freshdesk.com')
- Your API key or username
- Your password (optional, omit if using API key)
Without DI
$client = \Silktide\FreshdeskApi\ClientFactory::create('https://mydomain.freshdesk.com', 'myApiKeyOrUsername', 'password');
Password is optional and should be omitted if you're using an API key.
Supported requests
Currently, this library only supports submitting a ticket.
$client->submitTicket(
'A message',
'A subject',
'email@domain.com',
\Silktide\FreshdeskApi\Constant::PRIORITY_MEDIUM, // Defaults to low if omitted
\Silktide\FreshdeskApi\Constant::STATUS_OPEN // Defaults to open if omitted
);