;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!\210\300\307!\210\310\311\312\313\314\315%\210\316\317\320\321\322\323\314\311&\210\324\325\326\311!\"\210\324\327\330\311!\"\210\324\331\327\"\210\332\331\333\334#\210\335\311\336\327#\337\311\312\340\341$\207" [require eieio json gh-profile gh-url gh-auth gh-cache logito custom-declare-group gh-api nil "Github API." :group gh custom-declare-variable gh-api-username-filter 'gh-api-enterprise-username-filter "Filter to apply to usernames to build URL components" :type function defalias gh-api-p eieio-make-class-predicate gh-api--eieio-childp eieio-make-child-predicate gh-api-child-p make-obsolete "use (cl-typep ... \\='gh-api) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal ((sync :initarg :sync :initform t) (cache :initarg :cache :initform nil) (base :initarg :base :type string) (profile :initarg :profile :type string) (auth :initarg :auth :initform nil) (data-format :initarg :data-format) (num-retries :initarg :num-retries :initform 0) (log :initarg :log :initform nil) (cache-cls :initform gh-cache :allocation :class)) (:documentation "Github API")] 8) #@45 Create a new object of class type `gh-api'. (defalias 'gh-api #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api] 4 (#$ . 1277)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api compiler-macro gh-api--anon-cmacro] 4) (defalias 'gh-api--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\210\300\311\302\311\303\"\"\210\304\311\303\305\312$\210\300\313\302\313\303\"\"\210\304\313\303\305\314$\207" [eieio--defalias logito-log eieio--defgeneric-init-form nil eieio--defmethod gh-api #[(api level tag string &rest objects) "\305\306\307\310\" \n \f&\207" [api level tag string objects apply logito-log eieio-oref :log] 7] initialize-instance #[(api &rest args) "\300 \207" [call-next-method] 1] gh-api-set-default-auth #[(api auth) "\304\305\"\206 \304\306\"\307\310\311!\203\311\202\312!!\313\305 #\210 ?\2063\314 !\2053\315 \316\"?\205I\313\306\317\304\320\"\321\322\323\n\324!###+\207" [api auth classname cache eieio-oref :auth :cache symbol-name fboundp eieio-object-class object-class eieio-oset eieio-object-p object-of-class-p gh-cache make-instance cache-cls :object-name format "gh/%s/%s" gh-api-get-username] 11] gh-api-expand-resource #[(api resource) "\207" [resource] 1]] 5) (defalias 'gh-api-enterprise-username-filter #[(username) "\301\302\303#\207" [username replace-regexp-in-string "\\." "-"] 4]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\307\310\311\312!\"\210\307\313\314\312!\"\210\307\315\313\"\210\316\315\317\320#\210\321\312\322\313#\323\312\324\325\326$\207" [eieio--defalias gh-api-get-username eieio--defgeneric-init-form nil eieio--defmethod gh-api #[(api) "\303\211\304\"\305\"\n !)\207" [api username gh-api-username-filter eieio-oref :auth :username] 4] defalias gh-api-v3-p eieio-make-class-predicate gh-api-v3 gh-api-v3--eieio-childp eieio-make-child-predicate gh-api-v3-child-p make-obsolete "use (cl-typep ... \\='gh-api-v3) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-api) ((data-format :initarg :data-format :initform :json)) (:documentation "Github API v3")] 6) #@48 Create a new object of class type `gh-api-v3'. (defalias 'gh-api-v3 #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api-v3] 4 (#$ . 3656)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api-v3 compiler-macro gh-api-v3--anon-cmacro] 4) (defalias 'gh-api-v3--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\311\313\"\"\210\314\311\313\315\316$\210\317\320\321\322!\"\210\317\323\324\322!\"\210\317\325\323\"\210\326\325\327\330#\210\331\322\332\323#\333\322\334\335\313$\207" [custom-declare-variable gh-api-v3-authenticator 'gh-oauth-authenticator "Authenticator for Github API v3" :type (choice (const :tag "Password" gh-password-authenticator) (const :tag "OAuth" gh-oauth-authenticator)) :group gh-api eieio--defalias initialize-instance eieio--defgeneric-init-form nil eieio--defmethod gh-api-v3 #[(api &rest args) "\303 \210\300 \304 \305\300 #\210\304 \306\307 #\210\310 \311 \312\"\206 \n\313!\")\207" [gh-profile-current-profile api gh-api-v3-authenticator call-next-method eieio-oset :profile :base gh-profile-url gh-api-set-default-auth eieio-oref :auth "auth"] 5] defalias gh-api-request-p eieio-make-class-predicate gh-api-request gh-api-request--eieio-childp eieio-make-child-predicate gh-api-request-child-p make-obsolete "use (cl-typep ... \\='gh-api-request) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-url-request) ((default-response-cls :allocation :class :initform gh-api-response))] 8) #@53 Create a new object of class type `gh-api-request'. (defalias 'gh-api-request #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api-request] 4 (#$ . 5340)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api-request compiler-macro gh-api-request--anon-cmacro] 4) (defalias 'gh-api-request--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\211$\207" [defalias gh-api-response-p eieio-make-class-predicate gh-api-response gh-api-response--eieio-childp eieio-make-child-predicate gh-api-response-child-p make-obsolete "use (cl-typep ... \\='gh-api-response) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-url-response) nil] 6) #@54 Create a new object of class type `gh-api-response'. (defalias 'gh-api-response #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api-response] 4 (#$ . 6302)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api-response compiler-macro gh-api-response--anon-cmacro] 4) (defalias 'gh-api-response--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (defalias 'gh-api-json-decode #[(repr) "\203\n\302\230\203\f\303\207\304\305!)\207" [repr json-array-type "" empty list json-read-from-string] 2]) (defalias 'gh-api-json-encode #[(json) "\301\302!\303\"\207" [json encode-coding-string json-encode-list utf-8] 3]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\307\310\311\312!\"\210\307\313\314\312!\"\210\307\315\313\"\210\316\315\317\320#\210\321\312\322\313#\323\312\324\325\303$\207" [eieio--defalias gh-url-response-set-data eieio--defgeneric-init-form nil eieio--defmethod gh-api-response #[(resp data) "\302\303 !\"\207" [resp data call-next-method gh-api-json-decode] 4] defalias gh-api-paged-request-p eieio-make-class-predicate gh-api-paged-request gh-api-paged-request--eieio-childp eieio-make-child-predicate gh-api-paged-request-child-p make-obsolete "use (cl-typep ... \\='gh-api-paged-request) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-api-request) ((default-response-cls :allocation :class :initform gh-api-paged-response) (page-limit :initarg :page-limit :initform -1))] 6) #@59 Create a new object of class type `gh-api-paged-request'. (defalias 'gh-api-paged-request #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api-paged-request] 4 (#$ . 7927)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api-paged-request compiler-macro gh-api-paged-request--anon-cmacro] 4) (defalias 'gh-api-paged-request--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\211$\207" [defalias gh-api-paged-response-p eieio-make-class-predicate gh-api-paged-response gh-api-paged-response--eieio-childp eieio-make-child-predicate gh-api-paged-response-child-p make-obsolete "use (cl-typep ... \\='gh-api-paged-response) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-api-response) nil] 6) #@60 Create a new object of class type `gh-api-paged-response'. (defalias 'gh-api-paged-response #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api-paged-response] 4 (#$ . 8955)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api-paged-response compiler-macro gh-api-paged-response--anon-cmacro] 4) (defalias 'gh-api-paged-response--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\210\300\311\302\311\303\"\"\210\304\311\303\312\313$\210\314\315\316\317!\"\210\314\320\321\317!\"\210\314\322\320\"\210\323\322\324\325#\210\326\317\327\320#\330\317\331\332\303$\207" [eieio--defalias gh-api-paging-links eieio--defgeneric-init-form nil eieio--defmethod gh-api-paged-response #[(resp) "\305\306\307\310\"\"A\211\205;\311 \312\"\313\211\n:\2038\n@\314\315 \"\2031\316\317 \"\316\320 \"B\fB\nA\211\202\f\237+)\207" [resp links-header #:--cl-var-- item #:--cl-var-- assoc "Link" eieio-oref :headers split-string ", " nil string-match "^<\\(.*\\)>; rel=\"\\(.*\\)\"" match-string 2 1] 6] gh-url-response-set-data #[(resp data) "\306\307\"\310\311\312!\"A\313 \210\314\307\315\n\306\307\"\"#\210 \205g\306\316\"\317=?\205g\306\320\"\306 \321\"\211\247\203>\fS\202?\322\314 \321 #\210\306 \321\"\323=?\205f\314\324\325#\210\314 \326 #\210\314 \327\325#\210\330 \"+*\207" [resp next previous-data req last-page-limit this-page-limit eieio-oref :data assoc "next" gh-api-paging-links call-next-method eieio-oset append :http-status 304 :-req :page-limit -1 0 :data-received nil :url :query gh-url-run-request] 9] gh-api-authenticated-request gh-api #[(api transformer method resource &optional data params page-limit) "\306\307\"\211\310\267\202\311\202\312\202\313\306\314\"\f \315\316\3172\"!E3 \2055 \306 \320\"\235\20553\2114\205@\321 4\"\2115\205K\322 4\"65\205W\323 4\"\2117\205b\324 4\"85\203n7\205\266\325\306\326\"\327\330\331 \332\306\333\"\334\f\"P\3359\3368\203\223\3378B\nB\202\224\n\340 \341=\203\242\342:!\206\260 \343=\203\257\344:!\206\260\345\346;& \"<5\203\3157\204\315\327\347\350\351\3406%\202%4\203\374\327\306<\352\"\3532#=\354<=\"\210\355=\327\356\314 \3574\3608&\"\210=)\202% \203\361 3\"\210\354<\327\306<\352\"\3532#\"\202%\354<\327\306<\352\"\3532#\".\n\207" [api fmt headers cache resource method eieio-oref :data-format #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:form 11 :json 15)) (("Content-Type" . "application/x-www-form-urlencoded")) (("Content-Type" . "application/json")) nil :cache sha1 format "%s" safe-methods pcache-has pcache-get gh-cache-outdated-p gh-cache-etag gh-auth-modify-request :auth make-instance gh-api-paged-request :method :url :base gh-api-expand-resource :query :headers "If-None-Match" :data :json gh-api-json-encode :form gh-url-form-encode "" :page-limit gh-api-response :data-received t default-response-cls :transform gh-url-run-request gh-url-add-response-callback gh-api-callback :key :revive pcache-invalidate transformer key cache-key has-value value is-outdated etag params data page-limit req resp] 17] defalias gh-api-callback-p eieio-make-class-predicate gh-api-callback gh-api-callback--eieio-childp eieio-make-child-predicate gh-api-callback-child-p make-obsolete "use (cl-typep ... \\='gh-api-callback) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (gh-url-callback) ((cache :initarg :cache) (key :initarg :key) (revive :initarg :revive))] 6) #@54 Create a new object of class type `gh-api-callback'. (defalias 'gh-api-callback #[(&rest slots) "\301\302\303#\207" [slots apply make-instance gh-api-callback] 4 (#$ . 12734)]) (byte-code "\300\301\302\303#\300\207" [function-put gh-api-callback compiler-macro gh-api-callback--anon-cmacro] 4) (defalias 'gh-api-callback--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\307\310\311\303#\210\312\310\311\313#\210\314\315!\207" [eieio--defalias gh-url-callback-run eieio--defgeneric-init-form nil eieio--defmethod gh-api-callback #[(cb resp) "\304\305\"\304\306\"\304\307\"\203*\304 \310\"\311=\203*\312\n \"\210\313 \314\315\n \"#\202?\316\n \304 \314\"#\210\317\n \320\321\304 \322\"\"A#*\207" [cb key cache resp eieio-oref :cache :key :revive :http-status 304 gh-cache-revive eieio-oset :data pcache-get pcache-put gh-cache-set-etag assoc "ETag" :headers] 8] defalias gh-api-add-response-callback gh-url-add-response-callback make-obsolete "0.6.0" provide gh-api] 5)