Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Commit fbc05e6

Browse files
committed
Merge pull request #1 from PieterScheffers/master
Updated Zendesk PHP API client to version 2
2 parents 4331500 + 1e4f7fc commit fbc05e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"require": {
1414
"php": ">=5.4.0",
1515
"laravel/framework": "5.*",
16-
"zendesk/zendesk_api_client_php": "~1.0"
16+
"zendesk/zendesk_api_client_php": "2.*"
1717
},
1818
"autoload": {
1919
"psr-4": {

src/Services/ZendeskService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace Huddle\Zendesk\Services;
22

33
use Config, InvalidArgumentException, BadMethodCallException;
4-
use Zendesk\API\Client;
4+
use Zendesk\API\HttpClient;
55

66
class ZendeskService {
77

@@ -18,8 +18,8 @@ public function __construct() {
1818
if(!$this->subdomain || !$this->username || !$this->token) {
1919
throw new InvalidArgumentException('Please set ZENDESK_SUBDOMAIN, ZENDESK_USERNAME and ZENDESK_TOKEN environment variables.');
2020
}
21-
$this->client = new Client($this->subdomain, $this->username);
22-
$this->client->setAuth('token',$this->token);
21+
$this->client = new HttpClient($this->subdomain, $this->username);
22+
$this->client->setAuth('basic', ['username' => $this->username, 'token' => $this->token]);
2323
}
2424

2525
/**

0 commit comments

Comments
 (0)