Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianvillamayor/zendesksupport-api
Lightweight library that allows you to create, edit, delete and upload files to Zendesk Support. In a clean and standard way.
https://github.com/adrianvillamayor/zendesksupport-api
api php support zendesk-api zendesk-support
Last synced: 25 days ago
JSON representation
Lightweight library that allows you to create, edit, delete and upload files to Zendesk Support. In a clean and standard way.
- Host: GitHub
- URL: https://github.com/adrianvillamayor/zendesksupport-api
- Owner: AdrianVillamayor
- License: mit
- Created: 2021-10-20T08:29:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-11T19:54:36.000Z (about 3 years ago)
- Last Synced: 2024-11-18T05:56:55.837Z (about 1 month ago)
- Topics: api, php, support, zendesk-api, zendesk-support
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZendeskSupport-API
*By [Adrii](https://github.com/AdrianVillamayor)*
[![Latest Stable Version](https://img.shields.io/packagist/v/adrii/zendesk-api)](https://packagist.org/packages/adrii/zendesk-api)
[![Total Downloads](https://img.shields.io/packagist/dt/adrii/zendesk-api)](https://packagist.org/packages/adrii/zendesk-api)
[![License](https://img.shields.io/github/license/AdrianVillamayor/ZendeskAPI)](https://github.com/AdrianVillamayor/ZendeskAPI/blob/main/LICENSE)Lightweight library that allows you to create, edit, delete and upload files to Zendesk Suppot. In a clean and standard way.
## Installation
Use [Composer](https://getcomposer.org/) to install the library.
```bash
composer require adrii/zendesk-api
```### Composer
```php
use Adrii\ZendeskAPI;
```### Manual
```php
require_once ROOT . 'ZendeskAPI.php';
```## Usage
``` php
$data = array(
"username" => "1234qwer",
"type" => "problem",
"tags" => "ios,test",
"subject" => "Test",
"body" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tempor semper enim. Nam non semper ligula. Vestibulum sapien sapien, hendrerit pharetra elementum a, faucibus id nisl. Aenean ornare rhoncus ligula, eget efficitur augue suscipit vehicula. Fusce faucibus odio magna, sit amet aliquet ipsum sodales a.",
"first_name" => "Adrii",
"last_name" => "🍍",
"email" => "[email protected]",
);
for ($i = 0; $i < count($files); $i++) {
$zendesk->upload($files[$i]['name'], $files[$i]['tmp_name']);
}$comment = array(
array(
'type' => $data['type'],
'tags' => explode(",", $data['tags']),
'subject' => $data['subject'],
'comment' => array(
'body' => $data['body'],
'public' => false,
"uploads" => $zendesk->getUpload()
),
'requester' => array(
'locale_id' => '1',
'name' => $data['first_name'] . " " . $data['last_name'],
'email' => $data['email'],
),
'priority' => 'normal',
)
);$subdomain = "{subdomain}";
$user = "{user}";
$token = "{token}";$zend = new ZendeskApi($subdomain, $user, $token);
$zend->create($comment);
```
# Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.
# License
[MIT](https://github.com/AdrianVillamayor/ZendeskSupport-API/blob/main/LICENSE)Thanks for your help! 🎉