MEDIGO/go-zendesk

List tickets support

jpds opened this issue · 6 comments

jpds commented

I'd like to be able to list tickets and also search for tickets with metadata with this library:

jpds commented

I have an initial implementation of the search functionality in: jpds@6a72878

However the test is failing with:

--- FAIL: TestTicketCRUD (5.41s)
    require.go:794: 
        	Error Trace:	ticket_test.go:39
        	Error:      	Received unexpected error:
        	            	GET https://domain.zendesk.com/api/v2/tickets/search.json?query=evacuation: 400 Unknown: Oops! Something went wrong when parsing the error response.
        	Test:       	TestTicketCRUD

But I'm able to run:

$ curl "https://domain.zendesk.com/api/v2/search.json" -G --data-urlencode "query=evacuation" -v -u "username:password"

...just fine.

jpds commented

This appears to be done in feeadd9.

@eggman64 Can you please confirm?

Yes! Could you open a Pull Request?

This is done, right?

This is done, right?

Not yet. We now support
https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets-by-external-id

as well as

GET /api/v2/organizations/{organization_id}/tickets.json
GET /api/v2/users/{user_id}/tickets/requested.json

But not -

https://developer.zendesk.com/rest_api/docs/support/tickets#list-tickets

Addressed in #80