this repo has no description
at master 374 B view raw
1(import-macros {: use} :relude) 2(use nvim {: fun}) 3 4(use plenary.curl) 5 6(local xps {}) 7 8(fn profile [user] 9 (let [res (curl.get (.. "https://codestats.net/api/users/" user))] 10 (print (fennel.view res)) 11 (when (= res.status 200) 12 (fun.json_decode res.body)))) 13 14(fn add-xp [ft xp] 15 (tset xps ft (+ (if (= nil (. xps ft)) 0 (. xps ft)) xp))) 16 17{: profile : add-xp}