Giter Site home page Giter Site logo

It doesn't work about zendesk_api_client_php HOT 3 CLOSED

zendesk avatar zendesk commented on July 24, 2024
It doesn't work

from zendesk_api_client_php.

Comments (3)

kinyat avatar kinyat commented on July 24, 2024

It should be something like this.

use Zendesk\API\Client as ZendeskAPI;

$api_client = new ZendeskAPI($subdomain, $username);
$api_client->setAuth('token', $token);
$search_query = 'name:"ORG_NAME" type:"organization"';
$result = $api_client->search(array('query' => $search_query));

from zendesk_api_client_php.

joeelizondo avatar joeelizondo commented on July 24, 2024

I'm experiencing this same issue in production, maybe its a php version issue? I'm using 5.3.2. But no @door999mo, the error is thrown on the line $api_client = new ZendeskAPI($subdomain, $username); when instantiating the client. So it would never get to your other code. Its like it's trying to use the search function in the Search class as a constructor rather than using the ClientAbstract class' constructor. Very weird. I didn't have a problem with this on my slightly newer php 5.3.10 on my dev environment which leads me to believe it might be an issue in php? A fix for this would be very helpful.

I think this is the issue http://stackoverflow.com/questions/217618/construct-vs-sameasclassname-for-constructor-in-php

from zendesk_api_client_php.

sbkinney avatar sbkinney commented on July 24, 2024

The fix @joeelizondo contributed was merged on June 5th. I'm going to close this out. Thanks everyone!

from zendesk_api_client_php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.