diff --git a/github.lisp b/github.lisp index aa96cd6..d17bd63 100644 --- a/github.lisp +++ b/github.lisp @@ -155,7 +155,7 @@ slots.")) ((languages :reader languages)) (:documentation "List of languages.")) -(defclass parents () +(defclass parent () (id) ;; Yes this is a little strange... but this is how github does it, it ;; can be cleaned up later. @@ -175,7 +175,7 @@ slots.")) authored-date message tree committer) (:documentation "Detailed information on a commit.")) -(defclass modified () +(defclass file-diff () (diff filename) (:documentation "Modification information for a commit.")) @@ -653,4 +653,15 @@ original TITLE and BODY.")) ,repository ,issue) :comment comment))) +(defpackage #:nisp.github-extra + (:use :cl :iterate :nisp.github) + (:export #:show-followers-not-followed)) +(in-package :nisp.github-extra) +;;; Extra +(defun show-followers-not-followed (username) + "Show followers that USERNAME is not following." + ;; Thanks to scott olson for the idea. + (set-difference (show-followers username) (show-following username) + :test #'equal)) + ;;; End file diff --git a/json.lisp b/json.lisp index 4e176a1..6f9af96 100644 --- a/json.lisp +++ b/json.lisp @@ -11,8 +11,8 @@ ALIST. Hash table is initialized using the HASH-TABLE-INITARGS." (defparameter +github-class-map+ (alist-hash-table '(("USER" . "USER") ("PLAN" . "PLAN") ("AUTHOR" . "SIMPLE-USER") - ("PARENTS" . "PARENTS") ("COMMIT" . "COMMIT") - ("MODIFIED" . "MODIFIED") ("COMMITTER" . "SIMPLE-USER") + ("PARENTS" . "PARENT") ("COMMIT" . "COMMIT") + ("MODIFIED" . "FILE-DIFF") ("COMMITTER" . "SIMPLE-USER") ("DELETE-TOKEN" . "DELETE-TOKEN") ("TREE" . "TREE") ("BLOB" . "BLOB") ("BLOCKS" . "BLOCKS") ("HEADS" . "HEADS") ("COMMITS" . "COMMITS") diff --git a/users.lisp b/users.lisp index f58ee80..0bd5237 100644 --- a/users.lisp +++ b/users.lisp @@ -5,7 +5,4 @@ (:documentation "Person information.")) (defclass simple-user (contact-data) () - (:documentation "About the simplest user information github will send.")) - -(defclass committer (simple-user) ()) -(defclass author (simple-user) ()) \ No newline at end of file + (:documentation "About the simplest user information github will send.")) \ No newline at end of file