;ELC   
;;; Compiled
;;; in Emacs version 29.3
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207" [require json url-parse url-util plz ement-macros ement-structs] 2)#@891 Make API request on SESSION to ENDPOINT.
The request automatically uses SESSION's server, URI prefix, and
access token.

These keyword arguments are passed to `plz', which see: THEN,
DATA (passed as BODY), QUEUE (passed to `plz-queue', which see),
DATA-TYPE (passed as BODY-TYPE), ELSE, METHOD,
JSON-READ-FN (passed as AS), CONNECT-TIMEOUT, TIMEOUT.

Other arguments include PARAMS (used as the URL's query
parameters), ENDPOINT-CATEGORY (added to the endpoint URL), and
VERSION (added to the endpoint URL).

Note that most Matrix requests expect JSON-encoded data, so
usually the DATA argument should be passed through
`json-encode'.

(fn SESSION ENDPOINT &key THEN DATA PARAMS QUEUE (CONTENT-TYPE "application/json") (DATA-TYPE \='text) (ELSE #\='ement-api-error) (METHOD \='get) (ENDPOINT-CATEGORY "client") (JSON-READ-FN #\='json-read) (CONNECT-TIMEOUT 10) (TIMEOUT 60) (VERSION "r0"))
(defalias 'ement-api #[642 "\303\304\"A@\303\305\"A@\303\306\"A@\303\307\"A@\303\310\"\206  \311A@\303\312\"\206+ \313A@\303\314\"\2066 \315A@\303\316\"\206A \317A@\303	\320\"\206L \321A@\303\n\322\"\206W \323A@\303\324\"\206b \325A@\303\f\326\"\206m \327A@\303\330\"\206x \331A@\211\203\262 \211@\332>\203\232 \211A\204\222 \333\334@\"\210\211AA\262\202| \335>A@\203\251 \336\262\202| \333\337@\"\210\202| \210\340!>\210\341H\342H\340!	>\210\341H\343!\340!\n>\210\211\344H\345H\346H\347\350\n$\351!\352Q\353\354\355\336\211\n\n\336\356\336\356\211&!\357BC\336\203\360\361PBB\262\362\363\364\365\304$\314 \324\326\366\356\257\262\203H\367\370\371#!\207\370\372\"\207" [cl-struct-ement-session-tags cl-struct-ement-server-tags cl-struct-url-tags plist-member :then :data :params :queue :content-type (nil "application/json") :data-type (nil text) :else (nil ement-api-error) :method (nil get) :endpoint-category (nil "client") :json-read-fn (nil json-read) :connect-timeout (nil 10) :timeout (nil 60) :version (nil "r0") (:then :data :params :queue :content-type :data-type :else :method :endpoint-category :json-read-fn :connect-timeout :timeout :version :allow-other-keys) error "Missing argument for %s" :allow-other-keys nil "Keyword argument %s not one of (:then :data :params :queue :content-type :data-type :else :method :endpoint-category :json-read-fn :connect-timeout :timeout :version)" type-of 2 3 url-generic-parse-url 1 4 5 format "/_matrix/%s/%s/%s" url-build-query-string "?" url-recreate-url record url t "Content-Type" "Authorization" "Bearer " :headers :body :body-type :as :noquery plz-run apply plz-queue plz] 49 (#$ . 244)])
(byte-code "\300\301\302\303#\304\305\306\307#\207" [function-put ement-api lisp-indent-function defun define-error ement-api-error "Ement API error" error] 5)#@58 Signal an Ement API error for PLZ-ERROR.

(fn PLZ-ERROR)
(defalias 'ement-api-error #[257 "\302!>\210\211\303H\304H\305H\211\242\243\302!	>\205. \302!	>\204+ \306\307\310D\"\210\303H\302!	>\205K \302!	>\204H \306\307\310D\"\210\311H\211\205\\ \3121Z \313!0\202\\ \210\314\315\316\206d \203o \317\320\"\206v \206v 	#\306\321C\"\207" [cl-struct-plz-error-tags cl-struct-plz-response-tags type-of 2 3 1 signal wrong-type-argument plz-response 4 (error) json-read-from-string nil format "%S: %s" alist-get error ement-api-error] 15 (#$ . 3037)])
(provide 'ement-api)
