You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: readme.md
+39-20Lines changed: 39 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,51 +2,70 @@
2
2
3
3
This package provides integration with the Zendesk API. It supports creating tickets, retrieving and updating tickets, deleting tickets, etc.
4
4
5
-
The package simply provides a ```Zendesk``` facade that acts as a wrapper to the [zendesk/zendesk_api_client_php](https://github.com/zendesk/zendesk_api_client_php) package.
5
+
The package simply provides a `Zendesk` facade that acts as a wrapper to the [zendesk/zendesk_api_client_php](https://github.com/zendesk/zendesk_api_client_php) package.
6
6
7
7
**NB:** Currently only supports token-based authentication.
8
8
9
9
## Installation
10
10
11
-
Install via composer by adding the following to your composer.json:
Set your configuration using **environment variables**, either in your ```.env``` file or on your server's control panel:
40
40
41
-
-```ZENDESK_SUBDOMAIN``` - the subdomain part of your Zendesk organisation URL e.g. if your URL is http://huddledigital.zendesk.com use ```huddledigital```
42
-
-```ZENDESK_USERNAME``` - the username for the authenticating account.
43
-
-```ZENDESK_TOKEN``` - the access token. To generate an access token within Zendesk, click on Settings, API, enable Token Access and click 'add new token'.
41
+
To publish the config file to `app/config/zendesk-laravel.php` run:
Set your configuration using **environment variables**, either in your `.env` file or on your server's control panel:
49
+
50
+
-`ZENDESK_SUBDOMAIN`
51
+
52
+
The subdomain part of your Zendesk organisation URL.
53
+
54
+
e.g. http://huddledigital.zendesk.com use **huddledigital**
55
+
56
+
-`ZENDESK_USERNAME`
57
+
58
+
The username for the authenticating account.
59
+
60
+
-`ZENDESK_TOKEN`
61
+
62
+
The API access token. You can create one at: `https://SUBDOMAIN.zendesk.com/agent/admin/api/settings`
44
63
45
64
## Usage
46
65
47
66
### Facade
48
67
49
-
The ```Zendesk``` facade acts as a wrapper for an instance of the ```Zendesk\API\Client``` class. Any methods available on this class ([documentation here](https://github.com/zendesk/zendesk_api_client_php#usage)) are available through the facade. for example:
68
+
The `Zendesk` facade acts as a wrapper for an instance of the `Zendesk\API\Client` class. Any methods available on this class ([documentation here](https://github.com/zendesk/zendesk_api_client_php#usage)) are available through the facade. for example:
50
69
51
70
```php
52
71
// Get all tickets
@@ -72,7 +91,7 @@ Zendesk::ticket(123)->delete();
72
91
73
92
### Dependency injection
74
93
75
-
If you'd prefer not to use the facade, you can skip adding the alias to ```config/app.php``` and instead inject ```Huddle\Zendesk\Services\ZendeskService``` into your class. You can then use all of the same methods on this object as you would on the facade.
94
+
If you'd prefer not to use the facade, you can skip adding the alias to `config/app.php` and instead inject `Huddle\Zendesk\Services\ZendeskService` into your class. You can then use all of the same methods on this object as you would on the facade.
0 commit comments