diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-30 12:31:50 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-30 12:31:50 +0800 |
commit | 0588263c5283c85cd4751c2251f3eb7881d7f87f (patch) | |
tree | 523cae25ef373f7447c19fc07acce8bbd8167a4e /main.c | |
parent | ef01ae33d4f438ac642889ab5e85386d695ee36c (diff) |
Change ticket_search to search_ticket
because search is a different namespace in the REST API
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -5,6 +5,7 @@ #include <rtclient/client.h> #include <rtclient/user.h> #include <rtclient/ticket.h> +#include <rtclient/search.h> int main(void) { @@ -63,17 +64,17 @@ int main(void) , user->disabled); rtclient_user_free(user); - struct rtclient_ticket_list *list = NULL; + struct rtclient_search_ticket_list *list = NULL; static const char *prefix = "Owner='"; char query[strlen(prefix) + strlen(name) + 2]; sprintf(query, "%s%s'", prefix, name); - rtclient_ticket_search(&list, query); + rtclient_search_ticket(&list, query); if (list) { for (size_t i = 0; i < list->length; i++) { struct rtclient_ticket *ticket = list->tickets[i]; printf("%u: %s\n", ticket->id, ticket->subject); } - rtclient_ticket_freelist(list); + rtclient_search_ticket_free(list); } } free(name); |