From bd60dc3ed4a12ee6e98702863040cd2fc2e4d903 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Fri, 9 May 2014 12:43:27 -0400 Subject: * rt-liberation-rest.el: Document the show query issue. All of the relevant information is in a comment in rt-liberation-rest.el. --- rt-liberation-rest.el | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/rt-liberation-rest.el b/rt-liberation-rest.el index 5b3d0cb..2fbe8a6 100644 --- a/rt-liberation-rest.el +++ b/rt-liberation-rest.el @@ -63,6 +63,18 @@ "format=i" "&" "orderby=+Created"))) +(defun rt-liber-rest-show-string (scheme url ticket-id-list username password query) + "" + (let ((user (url-encode-url username)) + (pass (url-encode-url password))) + (concat scheme + "://" + url + "/REST/1.0/ticket/" ticket-id-list + "/show" "?" + "user=" user "&" + "pass=" pass "&"))) + (defun rt-liber-rest-call (url) "" (let ((url-request-method "POST")) @@ -88,6 +100,22 @@ rt-liber-rest-username rt-liber-rest-password query-string))) + ;; The "show" API call doesn't support getting multiple + ;; tickets at once. This is a problem. I've emailed the + ;; rt-users mailing list asking how to to this. + ;; + ;; A much more insidious method to figure this out is to + ;; wireshark the CLI connection as it asks for multiple + ;; tickets and see if we can capture the query the CLI + ;; uses. This would necessitate a non-HTTPS connection, such + ;; that the one to the demo servers. + ((string= op "show") + (rt-liber-rest-show-string rt-liber-rest-scheme + rt-liber-rest-url + query-string + rt-liber-rest-username + rt-liber-rest-password + query-string)) (t (error "unknown op [%s]" op)))) (defun rt-liber-rest-parse-http-header () -- cgit v1.2.3