Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rename library to cl-github

  • Loading branch information...
commit 22d4134d1cf2bfd5bfeedd3438d95bd0e8120407 1 parent 7770e69
@nixeagle authored
View
15 github.lisp
@@ -1,4 +1,4 @@
-(in-package :nisp.github)
+(in-package :cl-github)
(defparameter +github-api-url+ "http://github.com/api/v2/json"
;; Use only the json interface, we do not want to implement the xml or
@@ -17,13 +17,6 @@ This is the same for every call.")
(defvar *default-token* ""
"Default token to use when possible.")
-(defvar *current-prototype* nil
- "Stores the key of an object until its stored in `*PREVIOUS-PROTOTYPE*'.")
-(defvar *previous-prototype* nil
- "Stores the prototype of the json class above the current one.
-
-For example: {\"user\":{\"plan\":{\"name\":....}}}
-When parsing the plan json object, this will be set to \"USER\".")
(defmacro with-github-content-types (&body body)
"Evaluate BODY treating application/json as text."
@@ -158,10 +151,10 @@ When parsing the plan json object, this will be set to \"USER\".")
:want-string t))
-(defpackage #:nisp.github-extra
- (:use :cl :iterate :nisp.github)
+(defpackage #:cl-github-extra
+ (:use :cl :iterate :cl-github)
(:export #:show-followers-not-followed))
-(in-package :nisp.github-extra)
+(in-package :cl-github-extra)
;;; Extra
(defun show-followers-not-followed (username)
"Show followers that USERNAME is not following."
View
2  issues.lisp
@@ -1,4 +1,4 @@
-(in-package :nisp.github)
+(in-package :cl-github)
;;; Issues API
(defgeneric search-issues (username repository state term &key login token)
View
16 json.lisp
@@ -39,7 +39,7 @@
;;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
;;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-(in-package :nisp.github)
+(in-package :cl-github)
;;; From Alexandria
(defun alist-hash-table (alist &rest hash-table-initargs)
@@ -67,6 +67,14 @@ ALIST. Hash table is initialized using the HASH-TABLE-INITARGS."
"mapping of class strings to real classes.")
+(defvar *current-prototype* nil
+ "Stores the key of an object until its stored in `*PREVIOUS-PROTOTYPE*'.")
+(defvar *previous-prototype* nil
+ "Stores the prototype of the json class above the current one.
+
+For example: {\"user\":{\"plan\":{\"name\":....}}}
+When parsing the plan json object, this will be set to \"USER\".")
+
(defun beginning-of-object ()
"Do more at prototype init"
(setq *previous-prototype* *current-prototype*)
@@ -195,7 +203,7 @@ Otherwise, create a FLUID-OBJECT with slots interned in
(defgeneric to-json (object)
(:method :around (obj)
- (let ((json:*json-symbols-package* :nisp.github))
+ (let ((json:*json-symbols-package* :cl-github))
(with-local-class-registry (:inherit nil)
(call-next-method)))))
(defmethod to-json ((obj string))
@@ -242,8 +250,8 @@ Otherwise, create a FLUID-OBJECT with slots interned in
class))
(defmethod json->class :around (object class)
- "Set package to nisp.github and use local class registry."
- (let ((json:*json-symbols-package* :nisp.github))
+ "Set package to cl-github and use local class registry."
+ (let ((json:*json-symbols-package* :cl-github))
(with-local-class-registry (:inherit nil)
(call-next-method))))
View
2  network.lisp
@@ -1,4 +1,4 @@
-(in-package :nisp.github)
+(in-package :cl-github)
;;; Network API
(defgeneric show-network-meta (username repository &key login token)
View
29 nisp.github.asd
@@ -1,29 +0,0 @@
-(in-package :cl-user)
-(defpackage #:nisp.github-system
- (:use :cl :asdf))
-(in-package :nisp.github-system)
-
-
-(defsystem :nisp.github
- :version "0.1.0"
- :author "James S <i@nixeagle.org>"
- :maintainer "James S <i@nixeagle.org>"
- :license "GPLv3 or later"
- :depends-on (:iterate
- :drakma
- :flexi-streams
- :cl-json
- #+ sbcl :sb-introspect
- :nisp.util)
- :serial t
- :components
- ((:file "package")
- (:file "url-utils")
- (:file "users")
- (:file "repositories")
- (:file "issues")
- (:file "json")
- (:file "github")
- (:file "network"))) ;Needs COMMITS and USERS.
-
-;;; end
View
6 package.lisp
@@ -1,6 +1,6 @@
-(in-package :nisp.github-system)
+(in-package :cl-github-system)
-(defpackage #:nisp.github
+(defpackage #:cl-github
(:use :cl :json :iterate)
(:export
@@ -51,4 +51,4 @@
#:add-comment
))
-(in-package :nisp.github)
+(in-package :cl-github)
View
2  repositories.lisp
@@ -1,4 +1,4 @@
-(in-package :nisp.github)
+(in-package :cl-github)
(defclass repository ()
(description forks url homepage watchers fork open-issues private name owner))
View
2  url-utils.lisp
@@ -31,7 +31,7 @@
;;; Some modifications have been made by Nixeagle Copyright (c) 2010.
;;; Permission is granted to use under the original license (see above).
-(in-package :nisp.github)
+(in-package :cl-github)
(defmacro upgrade-vector (vector new-type &key converter)
"Returns a vector with the same length and the same elements as
View
2  users.lisp
@@ -1,4 +1,4 @@
-(in-package :nisp.github)
+(in-package :cl-github)
(defclass contact-data ()
Please sign in to comment.
Something went wrong with that request. Please try again.