;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\300\306!\207" [require json url sx sx-auth sx-request sx-filter] 2) #@2341 Call METHOD with additional keys. ID is the id associated with a question, answer, comment, post or user. SUBMETHOD is the additional segments of the method. KEYWORDS are the api parameters. Some parameters have their own keywords too, for convenience. The KEYWORDS argument overrides parameter specific keywords. FILTER is the set of filters to control the returned information AUTH defines how to act if the method or filters require authentication. URL-METHOD is either `post' or `get' SITE is the api parameter specifying the site. GET-ALL is nil or non-nil PROCESS-FUNCTION is a response-processing function PAGE is the page number which will be requested PAGESIZE is the number of items to retrieve per request, default 100 CALLBACK is a function to be called if the request succeeds. It is given the returned result as an argument. When AUTH is nil, it is assumed that no auth-requiring filters or methods will be used. If they are an error will be signaled. This is to ensure awareness of where auth is needed. When AUTH Is t, filters will automatically use a non-auth subset if no `access_token' is available. Methods requiring auth will instead use `sx-request-fallback' rather than have a failed API response. This is meant to allow for UI pages where portions may require AUTH but could still be used without authenticating (i.e a launch/home page). When AUTH is 'warn, methods will signal a `user-error'. This is meant for interactive commands that absolutely require authentication (submitting questions/answers, reading inbox, etc). Filters will treat 'warn as equivalent to t. If GET-ALL is nil, this method will only return the first (or specified) page available from this method call. If t, all pages will be retrieved (`sx-request-all-stop-when-no-more') . Otherwise, it is a function STOP-WHEN for `sx-request-all-items'. If PROCESS-FUNCTION is nil, only the items of the response will be returned (`sx-request-response-get-items'). Otherwise, it is a function that processes the entire response (as returned by `json-read'). See `sx-request-make' and `sx-request-all-items'. Return the entire response as a complex alist. (fn METHOD &key ID SUBMETHOD KEYWORDS PAGE (PAGESIZE 100) (FILTER \='(nil)) AUTH (URL-METHOD \='get) GET-ALL (PROCESS-FUNCTION #\='sx-request-response-get-items) CALLBACK SITE) (defalias 'sx-method-call #[385 "\300\301\"A@\300\302\"A@\300\303\"A@\300\304\"A@\300\305\"\206 \306A@\300\307\"\206+\310A@\300\311\"A@\300\312\"\206=\313A@\300 \314\"A@\300\n\315\"\206O\316A@\300 \317\"A@\300\f\320\"A@\f\211\203\214\211@\321>\203t\211AA\262\202a\322>A@\203\203\323\262\202a\324\325@\"\210\202a\210\326\327!\330 \"\331 !\332\333\"\205\251\332\334\"\205\263\332\334\"\205\307\n\335=\205\307\332\336\"\323\262R\203\321\337\202\322\340\341=\203\335\342\202\337\343\344\345\346\347=\n\n  &\210\2047\203 \347=\203\350\351!\210\2027\203 \203\352\262\2027\203& \203&\262 \2027\204.\2037 \2047\324\353!\210\354\355!BB\262\356\236\204R\356BB\262\357\236\204b\357BB\262\203p\360BB\262 \206|\f$\203\207!\210\207" [plist-member :id :submethod :keywords :page :pagesize (nil 100) :filter (nil (nil)) :auth :url-method (nil get) :get-all :process-function (nil sx-request-response-get-items) :callback :site (:id :submethod :keywords :page :pagesize :filter :auth :url-method :get-all :process-function :callback :site :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:id :submethod :keywords :page :pagesize :filter :auth :url-method :get-all :process-function :callback :site)" sx-cache-get auth sx-auth--method-p sx-auth--filter-p format "%s" "/%s" get "?site=%s" sx-request-all-items sx-request-make t sx-request-all-stop-when-no-more lwarn "sx-call-method" :debug "A: %S T: %S. M: %S,%s. F: %S" warn sx-user-error "This request requires authentication. Please run `M-x sx-authenticate' and try again." sx-request-fallback "This request requires authentication." filter sx-filter-get-var page pagesize site] 29 (#$ . 235)]) (byte-code "\300\301\302\303#\300\207" [function-put sx-method-call lisp-indent-function 1] 4) #@508 Make a POST `sx-method-call', deriving parameters from DATA. KEYS are [KEYWORD VALUE] pairs passed to `sx-method-call', except the following which are decided by this function: METHOD :site and :id are derived from DATA, where METHOD is either "answers", "comments", or "questions". :url-method is post. :filter is `sx-browse-filter'. :auth is warn. As a special exception, if the car of KEYS is not a keyword, it is assumed to be the :submethod argument. (fn DATA &rest KEYS) (defalias 'sx-method-post-from-data #[385 "\301!\210\302\236A\303\236A\304\236A\305\236A\306\307\203\310\202,\203'\311\202,\205,\312\313\2068\2068\314\315\316\317\320\321\f\322@!\203N\202R\323B& \207" [sx-browse-filter sx--ensure-site comment_id answer_id question_id site_par apply sx-method-call "comments" "answers" "questions" :id :auth warn :url-method post :filter :site keywordp :submethod] 22 (#$ . 4484)]) (byte-code "\300\301\302\303#\304\305!\207" [function-put sx-method-post-from-data lisp-indent-function 1 provide sx-method] 4)