- 
                Notifications
    
You must be signed in to change notification settings  - Fork 185
 
Closed
Description
From what I can figure out, it looks like methods correspond to URLs, with some intelligence/guessing:
# the query option is silently dropped
# https://github.com/zendesk/zendesk_api_client_rb/issues/47 maybe?
> $zendesk.ticket(query: 'moon').first
get https://juniper.zendesk.com/api/v2/tickets
# typos are passed to ZenDesk API
> $zendesk.tickts(query: 'moon').first
get https://juniper.zendesk.com/api/v2/tickts?query=moon
the server responded with status 404
{"error"=>"InvalidEndpoint", "description"=>"Not found"}
# notice that user becomes users:
 > $zendesk.user(query: 'moon').count
get https://juniper.zendesk.com/api/v2/users?query=moon
$zendesk.search(query: 'moon').first
NoMethodError: undefined method `superclass' for ZendeskAPI::Search:ModuleHow would I run a search, such as the following (which is a valid call)?
# simple
curl "https://juniper.zendesk.com/api/v2/search.json?query=type:moon" -v -u email:pasword
# typed:
 curl "https://juniper.zendesk.com/api/v2/search.json?query=type:ticket%20moon" -v -u email:pasword
Edit: #29 suggests client.users.search(:query => email).  How would I find this user's tickets?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels