Browse files

complete repos-repo api

  • Loading branch information...
1 parent 5cddda6 commit 275bd60b8a356404327530f72533ff367cb4fdc0 @tarsius tarsius committed Apr 29, 2012
Showing with 20 additions and 4 deletions.
  1. +20 −4 gh-repos.el
@@ -66,24 +66,33 @@
(git-url :initarg :git-url)
(ssh-url :initarg :ssh-url)
(svn-url :initarg :svn-url)
+ (mirror-url :initarg :mirror-url)
(owner :initarg :owner :initform nil)
(language :initarg :language)
(fork :initarg :fork)
(forks :initarg :forks)
(watchers :initarg :watchers)
(size :initarg :size)
+ (master-branch :initarg :master-branch)
(open-issues :initarg :open-issues)
(pushed-at :initarg :pushed-at)
(created-at :initarg :created-at)
- (owner-cls :allocation :class :initform gh-user))
+ (updated-at :initarg :updated-at)
+ (organisation :initarg :organisation :initform nil)
+ (parent :initarg :parent)
+ (source :initarg :source)
+ (owner-cls :allocation :class :initform gh-user)
+ (organisation-cls :allocation :class :initform gh-user)
+ (parent-cls :allocation :class :initform gh-repos-repo)
+ (source-cls :allocation :class :initform gh-repos-repo))
"Class for GitHub repositories")
(defmethod gh-object-read-into ((repo gh-repos-repo) data)
(with-slots (url html-url clone-url git-url ssh-url svn-url
owner language fork forks watchers size open-issues
- pushed-at created-at)
+ pushed-at created-at organisation parent source)
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
@@ -101,7 +110,14 @@
size (gh-read data 'size)
open-issues (gh-read data 'open_issues)
pushed-at (gh-read data 'pushed_at)
- created-at (gh-read data 'created_at))))
+ created-at (gh-read data 'created_at)
+ organisation (gh-object-read (or (oref repo :organisation)
+ (oref repo organisation-cls))
+ (gh-read data 'organisation))
+ parent (gh-object-read (oref repo parent-cls)
+ (gh-read data 'parent))
+ source (gh-object-read (oref repo source-cls)
+ (gh-read data 'source)))))
(defclass gh-repos-ref (gh-object)
((label :initarg :label)

0 comments on commit 275bd60

Please sign in to comment.