Tanya: It doesn't appear to be possible to search forums using the API (unless it's implemented in the standard search rest api, but that appears to relate specifically to tickets.) If entries support searching the same way users do, then you would do something like $array('query' => 'query=tags:blah keyword keyword2') with the options array. I've never tested that. The GET parameters building is definitely a bug, only applies if you pass in the options as an array. I've fixed it locally, need to upload. Just want to confirm so other tweaks I've made.

Obviously I'm using the right email address. I think I'm doing the ticket id wrong?

0

Brian Hartvigsen
March 01, 2010 17:42

Hey Adam, you aren't doing anything wrong. That's one of those "tweaks" I was mentioning in my reply to Tanya. Adding a comment doesn't work correctly in that build since it wraps the XML data in a <ticket> object instead of a <comment> object. Copy the following code and replace the existing $args['data' ] = ... in function update($page, $args):

I found something that might be of interest to you or others. The _singular function only returns the first character of the input parameter, if the input parameter does not contain 'ies'. When trying to create a ticket, the string 'tickets' is passed in, and the result is 't'.

To correct this, I changed the last line of the _singular function to the following:

else return substr($noun, 0, strlen($noun) - 1);

This causes it to return the full string minus the last character. In other words, pass in 'tickets', and the result is now 'ticket'.

Hi, thanks for spending time on the library. I´ve been trying to get it working but it fails somewhere.. I can get users and tags but not any entries nor posts and requests. I also tried to do a search with no success. What am I doing wrong:

Thanks for the library. Before we start to use it I just wanted to know if it does the following. Please let me know:

Adding a new ticket

Adding a new ticket with attached files

Adding a comment to an existing ticket

Closing a ticket

Adding time to a ticket

0

Dennis Monsewicz
August 04, 2010 14:40

I am trying to utilize the api library that you have created but when I try to retrieve all of the tickets in our system... I get a blank page... not that there are any errors but that the script isn't pulling all of the tickets.

require_once "Zendesk.lib.php";

$zd = new Zendesk("account", "username", "password", true);

$result = $zd->get(ZENDESK_TICKETS);

echo $result;

0

Eric Dahl
September 14, 2010 00:25

I am trying to figure out how to make a simple form that I can manually enter my user's external ID and have it populate.

can anyone point me in the right direction?

0

Tikhon
September 16, 2010 05:06

Hi Brian!

Useful lib, thanks for that.

Have a small question - Is it possible to sync users' passwords as well?

0

Tikhon
September 17, 2010 04:38

Me again :-)

Answering to my question - yes, it's possible.

'id' => $zendesk_id,

'details' => array(

'email' => $account->mail,

'name' => $account->name,

'external-id' => $account->uid,

'password' => $edit["pass"], //password synchronize

),

)

'id' => $zendesk_id,

'details' => array(

'email' => $account->mail,

'name' => $account->name,

'external-id' => $account->uid,

'password' => $edit["pass"], //password synchronize

),

)

Maybe it will be useful to anyone

0

Tikhon
September 17, 2010 04:39

ops, sorry

don't know how to manage that parser

0

Nicholas Van Dusen
April 06, 2011 15:52

I'm not seeing any downloads on Google Code, am I missing something? I'd really like to use this library!

Yeah. I got rid of the download since I was doing a lot of changes in a very short period of time and realized it wasn't actually very helpful in this case to have a separate download. As the main page says: