;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\313\314\315&\210\316\317\320\321\322\323\314\307&\210\316\324\325\326\322\323\314\307&\207" [require cl-lib url-http url-util xml custom custom-declare-group rtm nil "Options for emacs lisp integration of Remember The Milk" :tag "elisp RTM" :group applications custom-declare-variable rtm-api-key "d40eb4df08dd52c1930afa9d79dceda0" "Your own API key for Remember The Milk." :type string rtm-api-shared-secret "39d8e367fdce977c" "Your shared secret for your Remember The Milk API Key.\n\nNote that in an open source application it is not easily possible to\nhide the secret. That's why it's probably the best solution for every\nuser to register their own API key.\n\nSee also\nhttp://groups.google.com/group/rememberthemilk-api/browse_thread/thread/dcb035f162d4dcc8%3Fpli%3D1\n\nYou can register your own API key and secret under\nhttp://www.rememberthemilk.com/services/api/requestkey.rtm\n\nIn the description just tell them you're going to use the emacs lisp\nAPI Kit"] 8) #@100 Endpoint URL for REST requests. See http://www.rememberthemilk.com/services/api/request.rest.rtm (defconst rtm-rest-uri "http://api.rememberthemilk.com/services/rest/" (#$ . 1165)) #@98 Authentication service URL, see http://www.rememberthemilk.com/services/api/authentication.rtm (defconst rtm-auth-uri "http://www.rememberthemilk.com/services/auth/" (#$ . 1354)) #@79 Auth token received from RTM Website, after the user authenticated your app (defvar rtm-auth-token "" (#$ . 1541)) #@51 Set to t after the auth token has been validated. (defvar rtm-auth-token-valid nil (#$ . 1664)) #@40 Name for the rtm user interface buffer (defconst rtm-ui-buffer-name "*rtm*" (#$ . 1766)) #@57 Name for storing the auth token for the current session (defconst rtm-auth-token-file ".rtm-auth-token" (#$ . 1861)) #@22 The current timeline (defvar rtm-current-timeline nil (#$ . 1984)) #@13 debug level (defvar rtm-debug nil (#$ . 2057)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local rtm-auth-token-valid put permanent-local t] 4) (defalias 'def-rtm-method '(macro . #[(methodname rtm-method-name call-func result-func result-path &rest parms) "\306 \n \f\307 D\310\311\312\313 \"\"BBEF\207" [methodname parms result-func result-path call-func rtm-method-name defun quote mapcar #[(sym) "\301\302!E\207" [sym cons symbol-name] 3] cl-remove-if #[(sym) "\301=\206 \302=\207" [sym &optional &rest] 2]] 12])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-method lisp-indent-function 1] 4) (defalias 'def-rtm-macro '(macro . #[(macro-name call-func result-func) "\303\304\305\306\307\310\311\312\313 DCB\312\313\nDCB\314BBBBBCB\257\207" [macro-name call-func result-func defmacro (methodname rtm-method-name result-path &rest parms) (declare (indent 1)) \` def-rtm-method (\, methodname) (\, rtm-method-name) \, quote ('(\, result-path) (\,@ parms))] 12])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-macro lisp-indent-function 0] 4) (defalias 'def-rtm-signed-scalar-method '(macro . #[(methodname rtm-method-name result-path &rest parms) "\304 \305\306\307\nD BBBBBB\207" [methodname rtm-method-name result-path parms def-rtm-method rtm-call-signed rtm-get-scalar-from-response quote] 7])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-signed-scalar-method lisp-indent-function 1] 4) (defalias 'def-rtm-authenticated-scalar-method '(macro . #[(methodname rtm-method-name result-path &rest parms) "\304 \305\306\307\nD BBBBBB\207" [methodname rtm-method-name result-path parms def-rtm-method rtm-call-authenticated rtm-get-scalar-from-response quote] 7])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-authenticated-scalar-method lisp-indent-function 1] 4) (defalias 'def-rtm-timeline-scalar-method '(macro . #[(methodname rtm-method-name result-path &rest parms) "\304 \305\306\307\nD BBBBBB\207" [methodname rtm-method-name result-path parms def-rtm-method rtm-call-timeline rtm-get-scalar-from-response quote] 7])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-timeline-scalar-method lisp-indent-function 1] 4) (defalias 'def-rtm-signed-list-method '(macro . #[(methodname rtm-method-name result-path &rest parms) "\304 \305\306\307\nD BBBBBB\207" [methodname rtm-method-name result-path parms def-rtm-method rtm-call-signed rtm-get-list-from-response quote] 7])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-signed-list-method lisp-indent-function 1] 4) (defalias 'def-rtm-authenticated-list-method '(macro . #[(methodname rtm-method-name result-path &rest parms) "\304 \305\306\307\nD BBBBBB\207" [methodname rtm-method-name result-path parms def-rtm-method rtm-call-authenticated rtm-get-list-from-response quote] 7])) (byte-code "\300\301\302\303#\300\207" [function-put def-rtm-authenticated-list-method lisp-indent-function 1] 4) (defalias 'def-rtm-timeline-list-method '(macro . #[(methodname rtm-method-name result-path &rest parms) "\304 \305\306\307\nD BBBBBB\207" [methodname rtm-method-name result-path parms def-rtm-method rtm-call-timeline rtm-get-list-from-response quote] 7])) (byte-code "\300\301\302\303#\304\305\306\"\210\304\307\310\"\210\304\311\312\"\210\304\313\314\"\210\304\315\301\"\210\316\305\302\303#\210\316\317\302\303#\210\316\307\302\303#\210\316\311\320\303#\210\316\313\302\303#\210\316\315\302\303#\207" [function-put def-rtm-timeline-list-method lisp-indent-function 1 defalias def-rtm-si-sca def-rtm-signed-scalar-method def-rtm-authenticated-scalar-method! def-rtm-timeline-scalar-method def-rtm-si-lis def-rtm-signed-list-method def-rtm-list def-rtm-authenticated-list-method def-rtm-list! put def-rtm-authenticated-scalar-method lisp-indent--function] 5) (defalias 'rtm-call-unsigned #[(method &rest params) "\304\305 \n\"\"\306 !)\207" [rtm-rest-uri method params request rtm-construct-request-url rtm-prepare-params rtm-do-request] 5]) (defalias 'rtm-call-signed #[(method &rest params) "\306 \"\307\n!\310\f \"\311 !+\207" [method params unsigned-params all-params rtm-rest-uri request rtm-prepare-params append-api-sig rtm-construct-request-url rtm-do-request] 3]) (defalias 'rtm-call-authenticated #[(method &rest params) "\302\303\304\305 B $\207" [method params apply rtm-call-signed "auth_token" rtm-authenticate] 5]) (defalias 'rtm-call-timeline #[(method &rest params) "\302\303\304\305 B $\207" [method params apply rtm-call-authenticated "timeline" rtm-timeline] 5]) (defalias 'rtm-get-nodes-from-node-list #[(node-name node-list) "\301\302\"\207" [node-list cl-remove-if-not #[(el) " \211@\262=\207" [node-name el] 3]] 3]) (defalias 'rtm-get-node-content-from-response #[(node-name response) "\302 \"@\211AA\207" [node-name response rtm-get-nodes-from-node-list] 3]) (defalias 'rtm-get-list-from-response #[(path response) " \211\203\304 @\n\" A\211\204\n*\207" [path response content rst rtm-get-node-content-from-response] 4]) (defalias 'rtm-get-scalar-from-response #[(path response) "\302 \"@\207" [path response rtm-get-list-from-response] 3]) (defalias 'rtm-auth-check-token #[(auth_token) "\301\302\303\304\305B\"\"\207" [auth_token rtm-get-scalar-from-response (auth token) rtm-call-signed rtm\.auth\.checkToken "auth_token"] 6]) (defalias 'rtm-auth-get-frob #[nil "\300\301\302\303!\"\207" [rtm-get-scalar-from-response (frob) rtm-call-signed rtm\.auth\.getFrob] 4]) (defalias 'rtm-auth-get-token #[(frob) "\301\302\303\304\305B\"\"\207" [frob rtm-get-scalar-from-response (auth token) rtm-call-signed rtm\.auth\.getToken "frob"] 6]) (defalias 'rtm-contacts-add #[(contact) "\301\302\303\304\305B\"\"\207" [contact rtm-get-list-from-response (contact) rtm-call-timeline rtm\.contacts\.add "contact"] 6]) (defalias 'rtm-contacts-delete #[(contact_id) "\301\302\303\304\305B\"\"\207" [contact_id rtm-get-list-from-response nil rtm-call-timeline rtm\.contacts\.delete "contact_id"] 6]) (defalias 'rtm-contacts-get-list #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response (contacts) rtm-call-authenticated rtm\.contacts\.getList] 4]) (defalias 'rtm-groups-add #[(group) "\301\302\303\304\305B\"\"\207" [group rtm-get-list-from-response nil rtm-call-timeline rtm\.groups\.add "group"] 6]) (defalias 'rtm-groups-add-contact #[(group_id contact_id) "\302\303\304\305\306B\307 B#\"\207" [group_id contact_id rtm-get-list-from-response nil rtm-call-timeline rtm\.groups\.addContact "group_id" "contact_id"] 7]) (defalias 'rtm-groups-delete #[(group_id) "\301\302\303\304\305B\"\"\207" [group_id rtm-get-list-from-response nil rtm-call-timeline rtm\.groups\.delete "group_id"] 6]) (defalias 'rtm-groups-get-list #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response nil rtm-call-authenticated rtm\.groups\.getList] 4]) (defalias 'rtm-groups-remove-contact #[(group_id contact_id) "\302\303\304\305\306B\307 B#\"\207" [group_id contact_id rtm-get-list-from-response nil rtm-call-timeline rtm\.groups\.removeContact "group_id" "contact_id"] 7]) (defalias 'rtm-lists-add #[(name &optional filter) "\302\303\304\305\306B\307 B#\"\207" [name filter rtm-get-list-from-response nil rtm-call-timeline rtm\.lists\.add "name" "filter"] 7]) (defalias 'rtm-lists-archive #[(list_id) "\301\302\303\304\305B\"\"\207" [list_id rtm-get-list-from-response nil rtm-call-timeline rtm\.lists\.archive "list_id"] 6]) (defalias 'rtm-lists-delete #[(list_id) "\301\302\303\304\305B\"\"\207" [list_id rtm-get-list-from-response nil rtm-call-timeline rtm\.lists\.delete "list_id"] 6]) (defalias 'rtm-lists-get-list #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response (lists) rtm-call-authenticated rtm\.lists\.getList] 4]) (defalias 'rtm-lists-set-default-list #[(list_id) "\301\302\303\304\305B\"\"\207" [list_id rtm-get-list-from-response nil rtm-call-timeline rtm\.lists\.setDefaultList "list_id"] 6]) (defalias 'rtm-lists-set-name #[(list_id name) "\302\303\304\305\306B\307 B#\"\207" [list_id name rtm-get-list-from-response nil rtm-call-timeline rtm\.lists\.setName "list_id" "name"] 7]) (defalias 'rtm-lists-unarchive #[(list_id) "\301\302\303\304\305B\"\"\207" [list_id rtm-get-list-from-response nil rtm-call-timeline rtm\.lists\.unarchive "list_id"] 6]) (defalias 'rtm-locations-get-list #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response (locations) rtm-call-authenticated rtm\.locations\.getList] 4]) (defalias 'rtm-reflection-get-methods #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response (methods) rtm-call-signed rtm\.reflection\.getMethods] 4]) (defalias 'rtm-reflection-get-method-info #[(method_name) "\301\302\303\304\305B\"\"\207" [method_name rtm-get-scalar-from-response nil rtm-call-signed rtm\.reflection\.getMethodInfo "method_name"] 6]) (defalias 'rtm-settings-get-list #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response (settings) rtm-call-authenticated rtm\.settings\.getList] 4]) (defalias 'rtm-tasks-add #[(name &optional parse list_id) "\303\304\305\306\307B\310 B\311\nB$\"\207" [name parse list_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.add "name" "parse" "list_id"] 8]) (defalias 'rtm-tasks-add-tags #[(list_id taskseries_id task_id tags) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id tags rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.addTags "list_id" "taskseries_id" "task_id" "tags"] 9]) (defalias 'rtm-tasks-complete #[(list_id taskseries_id task_id) "\303\304\305\306\307B\310 B\311\nB$\"\207" [list_id taskseries_id task_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.complete "list_id" "taskseries_id" "task_id"] 8]) (defalias 'rtm-tasks-delete #[(list_id taskseries_id task_id) "\303\304\305\306\307B\310 B\311\nB$\"\207" [list_id taskseries_id task_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.delete "list_id" "taskseries_id" "task_id"] 8]) (defalias 'rtm-tasks-get-list #[(&optional list_id filter last_sync) "\303\304\305\306\307B\310 B\311\nB$\"\207" [list_id filter last_sync rtm-get-list-from-response (tasks) rtm-call-authenticated rtm\.tasks\.getList "list_id" "filter" "last_sync"] 8]) (defalias 'rtm-tasks-move-priority #[(list_id taskseries_id task_id direction) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id direction rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.movePriority "list_id" "taskseries_id" "task_id" "direction"] 9]) (defalias 'rtm-tasks-move-to #[(from_list_id to_list_id taskseries_id task_id) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [from_list_id to_list_id taskseries_id task_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.moveTo "from_list_id" "to_list_id" "taskseries_id" "task_id"] 9]) (defalias 'rtm-tasks-postpone #[(list_id taskseries_id task_id) "\303\304\305\306\307B\310 B\311\nB$\"\207" [list_id taskseries_id task_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.postpone "list_id" "taskseries_id" "task_id"] 8]) (defalias 'rtm-tasks-remove-tags #[(list_id taskseries_id task_id tags) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id tags rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.removeTags "list_id" "taskseries_id" "task_id" "tags"] 9]) (defalias 'rtm-tasks-set-due-date #[(list_id taskseries_id task_id &optional due has_due_time parse) "\306\307\310\311\312B\313 B\314\nB\315 B\316\fB\317 B&\"\207" [list_id taskseries_id task_id due has_due_time parse rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setDueDate "list_id" "taskseries_id" "task_id" "due" "has_due_time" "parse"] 11]) (defalias 'rtm-tasks-set-estimate #[(list_id taskseries_id task_id &optional estimate) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id estimate rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setEstimate "list_id" "taskseries_id" "task_id" "estimate"] 9]) (defalias 'rtm-tasks-set-location #[(list_id taskseries_id task_id &optional location_id) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id location_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setLocation "list_id" "taskseries_id" "task_id" "location_id"] 9]) (defalias 'rtm-tasks-set-name #[(list_id taskseries_id task_id name) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id name rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setName "list_id" "taskseries_id" "task_id" "name"] 9]) (defalias 'rtm-tasks-set-priority #[(list_id taskseries_id task_id &optional priority) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id priority rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setPriority "list_id" "taskseries_id" "task_id" "priority"] 9]) (defalias 'rtm-tasks-set-recurrence #[(list_id taskseries_id task_id &optional repeat) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id repeat rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setRecurrence "list_id" "taskseries_id" "task_id" "repeat"] 9]) (defalias 'rtm-tasks-set-tags #[(list_id taskseries_id task_id &optional tags) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id tags rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setTags "list_id" "taskseries_id" "task_id" "tags"] 9]) (defalias 'rtm-tasks-set-url #[(list_id taskseries_id task_id &optional url) "\304\305\306\307\310B\311 B\312\nB\313 B%\"\207" [list_id taskseries_id task_id url rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.setURL "list_id" "taskseries_id" "task_id" "url"] 9]) (defalias 'rtm-tasks-uncomplete #[(list_id taskseries_id task_id) "\303\304\305\306\307B\310 B\311\nB$\"\207" [list_id taskseries_id task_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.uncomplete "list_id" "taskseries_id" "task_id"] 8]) (defalias 'rtm-tasks-notes-add #[(list_id taskseries_id task_id note_title note_text) "\305\306\307\310\311B\312 B\313\nB\314 B\315\fB&\"\207" [list_id taskseries_id task_id note_title note_text rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.notes\.add "list_id" "taskseries_id" "task_id" "note_title" "note_text"] 10]) (defalias 'rtm-tasks-notes-delete #[(note_id) "\301\302\303\304\305B\"\"\207" [note_id rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.notes\.delete "note_id"] 6]) (defalias 'rtm-tasks-notes-edit #[(note_id note_title note_text) "\303\304\305\306\307B\310 B\311\nB$\"\207" [note_id note_title note_text rtm-get-list-from-response nil rtm-call-timeline rtm\.tasks\.notes\.edit "note_id" "note_title" "note_text"] 8]) (defalias 'rtm-test-echo #[nil "\300\301!\207" [rtm-call-unsigned rtm\.test\.echo] 2]) (defalias 'rtm-test-login #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response nil rtm-call-authenticated rtm\.test\.login] 4]) (defalias 'rtm-time-convert #[(to_timezone &optional from_timezone time) "\303\304\305\306\307B\310 B\311\nB$\"\207" [to_timezone from_timezone time rtm-get-list-from-response nil rtm-call-signed rtm\.time\.convert "to_timezone" "from_timezone" "time"] 8]) (defalias 'rtm-timelines-create #[nil "\300\301\302\303!\"\207" [rtm-get-scalar-from-response (timeline) rtm-call-authenticated rtm\.timelines\.create] 4]) (defalias 'rtm-timeline #[nil "\204\301 \207" [rtm-current-timeline rtm-timelines-create] 1]) (defalias 'rtm-timezones-get-list #[nil "\300\301\302\303!\"\207" [rtm-get-list-from-response nil rtm-call-signed rtm\.timezones\.getList] 4]) (defalias 'rtm-transactions-undo #[(transaction_id) "\301\302\303\304\305B\"\"\207" [transaction_id rtm-get-list-from-response nil rtm-call-timeline rtm\.transactions\.undo "transaction_id"] 6]) #@109 Always use this function to call an authenticated method, it's the only one that will update rtm-auth-token (defalias 'rtm-authenticate #[nil "\302 \206\211\203\303 !\203 \202\304 )\211\207" [rtm-auth-token auth-token rtm-get-stored-auth-token rtm-auth-token-valid rtm-get-new-auth-token] 3 (#$ . 17918)]) (defalias 'rtm-auth-token-valid #[(auth-token) "\203\303\207\3041\305 !0\202\210\306\211\205! \n\230\205!\303\211)\207" [rtm-auth-token-valid auth-token token t (error) rtm-auth-check-token nil] 3]) (defalias 'rtm-get-new-auth-token #[nil "\303 \304\305\"\306\n\204-\307 !\210\310 !\210\311!\312\n!\203'\313\n!\210\202\n\306\211\203\n+\207" [frob auth-url auth-token rtm-auth-get-frob rtm-authentication-url delete nil browse-url rtm-authentication-dialog rtm-auth-get-token rtm-auth-token-valid rtm-store-auth-token] 4]) (defalias 'rtm-store-auth-token #[(auth-token) "\306!\307 !\204% \310\311\312\"\313\216r\nq\210)r\nq\210\314\315\211 \315\316%\210,\317 \320\"\210 \310\311\312\"\321\216r\fq\210c\210)r\fq\210\314\315\211 \315\316%\210-\207" [rtm-auth-token-file token-file #1=#:temp-buffer #2=#:temp-file #3=#:temp-buffer #4=#:temp-file locate-user-emacs-file file-exists-p generate-new-buffer " *temp file*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] write-region nil 0 set-file-modes 384 #[nil "\301!\205 \302!\207" [#3# buffer-name kill-buffer] 2] auth-token] 6]) (defalias 'rtm-get-stored-auth-token #[nil "\303!\304 !\205)\305 !\203%\306\307\310\"r\nq\210\311\216\312 !\210\313 +\202)\314\315 \")\207" [rtm-auth-token-file token-file #1=#:temp-buffer locate-user-emacs-file file-exists-p file-readable-p generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] insert-file-contents buffer-string error "Auth token store %s exists, but is not readable."] 3]) (defalias 'rtm-authentication-dialog #[(auth-url) "\303!r q\210\304c\210\305\n\306\307#\210\310 !\210\311\312!\210\313 !*\207" [rtm-ui-buffer-name rtm-buffer auth-url generate-new-buffer "Please visit the following url to authenticate this\napplication:\n\n" insert-text-button type rtm-url display-buffer read-from-minibuffer "Press RETURN if after authentication was granted" kill-buffer] 4]) (byte-code "\300\301\302\303\304\305%\210\300\306\304\305#\207" [define-button-type rtm-url action #[(x) "\301`!\302\303!!)\207" [button button-at browse-url button-label] 3] follow-link t rtm-button] 6) (defalias 'rtm-authentication-url #[(perms frob) "\306B\307\310 !B\311\nBE\312 !\313 \f\"*\207" [rtm-api-key perms frob unsigned-params all-params rtm-auth-uri "api_key" "perms" maybe-string "frob" append-api-sig rtm-construct-request-url] 4]) (defalias 'rtm-do-request #[(request) "\203 \302\303 \"\210\304\305 !!\207" [rtm-debug request message "request: %s" rtm-parse-response url-retrieve-synchronously] 3]) (defalias 'rtm-api-sig #[(params) "\306!\307 \310\"\311\312\n\"\313\314 \" \fP\315!-\207" [params param-copy sorted-params joined-params params-str rtm-api-shared-secret cl-copy-list sort #[(lhs rhs) "@ @\231\207" [lhs rhs] 2] mapcar #[(param) "@AP\207" [param] 2] cl-reduce concat md5 with-secret] 3]) (defalias 'rtm-prepare-params #[(method params) "\302\303\304 !!\"\207" [method params rtm-add-method+api rtm-stringify-params rtm-weed-empty-params] 5]) (defalias 'rtm-stringify-params #[(params) "\301\302\"\207" [params mapcar rtm-stringify-param] 3]) (defalias 'rtm-stringify-param #[(param) "@A\303 !\304\n!*B\207" [param name value rtm-stringify-param-name rtm-stringify-value] 3]) (defalias 'rtm-stringify-param-name #[(name) ";\203\2079\205\301!\207" [name symbol-name] 2]) (defalias 'rtm-stringify-value #[(value) ";\203\207\301=\203\302\207\204\303\207<\203\304!\2079\203'\305!\207\247\205/\306!\207" [value t "true" "false" rtm-comma-separated-list symbol-name number-to-string] 2]) #@60 turn a list into a comma separated string (and flatten it) (defalias 'rtm-comma-separated-list #[(lis) "\302\303\211 \304\")\207" [#1=#:--cl-comsep-- lis nil #[(lis first) "\204\303\207 \203\303\202\304\305@!\nA\306\"Q\207" [lis first #1# "" "," rtm-stringify-value nil] 5] t] 4 (#$ . 21876)]) (defalias 'rtm-weed-empty-params #[(params) "\301\302\"\207" [params cl-remove-if #[(param) "<\205??\205A?\207" [param] 1]] 3]) (defalias 'rtm-add-method+api #[(method params) "\303\304\305!B\306 BD\n\"\207" [method rtm-api-key params append "method" maybe-string "api_key"] 4]) #@50 Construct a URL for calling a method from params (defalias 'rtm-construct-request-url #[(base-uri params) "\304\305\"\306 !\307 \310\nQ!*\207" [params param-pairs query base-uri mapcar rtm-format-param rtm-join-params string-to-unibyte "?"] 4 (#$ . 22475)]) (defalias 'rtm-format-param #[(param) "@A\211\303\304 !Q*\207" [param value key "=" url-hexify-string] 5]) (defalias 'rtm-join-params #[(params) "\301\302\"\207" [params cl-reduce #[(left right) "\302 Q\207" [left right "&"] 3]] 3]) (defalias 'rtm-construct-url #[(method) "\303 \304\n\260\207" [rtm-rest-uri method rtm-api-key "?method=" "&api_key="] 5]) (defalias 'rtm-parse-response #[(response) "rq\210\306ed\"\307\303 \"\211G\310V\203\311\312\313 !\"\210\n@\211\211AA\262\314 !\211\2045\311\315\313 !\"\210 \316=\203?\f\202k\307\317\f\"@\211\320\321\"\206P\322\266\202\323\321\"\206_\322\266\202\324\325#+.\207" [response node-list rsps rsp children stat xml-parse-region rtm-get-nodes-from-node-list 1 warn "Got more than one node in response, please examine!\nResponse:%s" pp rtm-stat "Weird, got no stat attribute in node.\n%s" ok err code xml-get-attribute-or-nil "" msg error "Error in server response: Code: %s\n\nMessage: \"%s\""] 6]) (defalias 'rtm-stat #[(rsp) "\302\301\"\211\203\303 \227!\202 )\207" [rsp stat xml-get-attribute-or-nil intern] 4]) (defalias 'append-api-sig #[(unsigned-params) "\302!\303\304 BC\")\207" [unsigned-params api-sig rtm-api-sig append "api_sig"] 4]) (defalias 'maybe-string #[(symbol-or-string) ";\203\207\301!\207" [symbol-or-string symbol-name] 2]) (provide 'rtm)