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

Commit

Permalink
Merge pull request #1 from PieterScheffers/master
Browse files Browse the repository at this point in the history
Updated Zendesk PHP API client to version 2
  • Loading branch information
tom-huddle committed Nov 2, 2015
2 parents 4331500 + 1e4f7fc commit fbc05e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": ">=5.4.0",
"laravel/framework": "5.*",
"zendesk/zendesk_api_client_php": "~1.0"
"zendesk/zendesk_api_client_php": "2.*"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions src/Services/ZendeskService.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php namespace Huddle\Zendesk\Services;

use Config, InvalidArgumentException, BadMethodCallException;
use Zendesk\API\Client;
use Zendesk\API\HttpClient;

class ZendeskService {

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

/**
Expand Down

0 comments on commit fbc05e6

Please sign in to comment.