summaryrefslogtreecommitdiff
path: root/src/gizmo/wasp-aoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'src/gizmo/wasp-aoc.el')
-rw-r--r--src/gizmo/wasp-aoc.el60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/gizmo/wasp-aoc.el b/src/gizmo/wasp-aoc.el
index 57b16c32..4c287add 100644
--- a/src/gizmo/wasp-aoc.el
+++ b/src/gizmo/wasp-aoc.el
@@ -19,23 +19,23 @@
(defvar w/aoc-user-stars nil)
(defconst w/aoc-name-map
'(("exodrifter_" . "exodrifter")
- ("cephon_altera" . "lainlayer")
- ("monochrome_0" . "monochrome")
- ("yoink2000" . "darius1702")
- ("lukeisun_" . "lukeisun")
- ("dwinkley_" . "dwinkley")
- ("lcolonq" . "llll colonq")
- ("fn_lumi" . "lumi")
- ("leadengin" . "leaden")
- ("vasher_1025" . "vash3r")
- ("andrewdtr" . "drawthatredstone")
- ("badcop_" . "cgsdev0")
- ("asrael_io" . "asrael")
- ("colinahscopy_" . "@colinahscopy")
- ("ctrl_o" . "control-o")
- ("whimsicallymade" . "aecepoglu")
- ("chromosundrift" . "christo")
- ))
+ ("cephon_altera" . "lainlayer")
+ ("monochrome_0" . "monochrome")
+ ("yoink2000" . "darius1702")
+ ("lukeisun_" . "lukeisun")
+ ("dwinkley_" . "dwinkley")
+ ("lcolonq" . "llll colonq")
+ ("fn_lumi" . "lumi")
+ ("leadengin" . "leaden")
+ ("vasher_1025" . "vash3r")
+ ("andrewdtr" . "drawthatredstone")
+ ("badcop_" . "cgsdev0")
+ ("asrael_io" . "asrael")
+ ("colinahscopy_" . "@colinahscopy")
+ ("ctrl_o" . "control-o")
+ ("whimsicallymade" . "aecepoglu")
+ ("chromosundrift" . "christo")
+ ))
(defun w/aoc-max-stars ()
"Return the maximum Advent of Code stars for today."
@@ -44,7 +44,7 @@
(defun w/aoc-lookup-stars (user)
"Retrieve the Advent of Code stars for USER."
(let* ((duser (s-downcase user))
- (cuser (s-downcase (alist-get duser w/aoc-name-map duser nil #'s-equals?))))
+ (cuser (s-downcase (alist-get duser w/aoc-name-map duser nil #'s-equals?))))
(alist-get cuser w/aoc-user-stars nil nil #'s-equals?)))
(defun w/aoc-fetch-api (k)
@@ -58,24 +58,24 @@ Pass the resulting JSON to K."
:parser #'json-parse-buffer
:success
(cl-function
- (lambda (&key data &allow-other-keys)
- (setq w/aoc-last-response data)
- (funcall k data))))
+ (lambda (&key data &allow-other-keys)
+ (setq w/aoc-last-response data)
+ (funcall k data))))
nil)
(defun w/aoc-update-user-stars ()
"Update the Advent of Code stars list."
(w/aoc-fetch-api
- (lambda (data)
- (setf
- w/aoc-user-stars
- (--map
- (cons (s-downcase (car it)) (cdr it))
- (--filter
- (stringp (car it))
+ (lambda (data)
+ (setf
+ w/aoc-user-stars
(--map
- (cons (ht-get it "name") (ht-get it "stars"))
- (ht-values (ht-get data "members")))))))))
+ (cons (s-downcase (car it)) (cdr it))
+ (--filter
+ (stringp (car it))
+ (--map
+ (cons (ht-get it "name") (ht-get it "stars"))
+ (ht-values (ht-get data "members")))))))))
;; (w/aoc-update-user-stars)
(provide 'wasp-aoc)