summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-30 12:31:50 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-30 12:31:50 +0800
commit0588263c5283c85cd4751c2251f3eb7881d7f87f (patch)
tree523cae25ef373f7447c19fc07acce8bbd8167a4e /main.c
parentef01ae33d4f438ac642889ab5e85386d695ee36c (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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index ca26bc6..9a8852c 100644
--- a/main.c
+++ b/main.c
@@ -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);