Permalink
Browse files

Please see ChangeLog

  • Loading branch information...
1 parent c226eb7 commit ec819f8f368a04cd41ec0028860a5089a282ae60 Plato Wu committed Dec 20, 2009
Showing with 37 additions and 49 deletions.
  1. +5 −0 ChangeLog
  2. +19 −36 doc/index.html
  3. +5 −5 example/clbuild-repos.lisp
  4. +1 −1 launchpad.asd
  5. +4 −4 launchpad.lisp
  6. +2 −2 oauth.lisp
  7. +1 −1 packages.lisp
View
@@ -1,3 +1,8 @@
+2009-12-20 Plato Wu <gtalk000@gmail.com>
+
+ * packages.lisp (:launchpad): leave out the -a- infix for function name
+ Leslie's recommendation.
+
2009-12-11 Plato Wu <gtalk000@gmail.com>
* example/clbuild-repos.lisp: update example.
View
@@ -43,17 +43,15 @@
<li><a href="#dictionary">The dictionary</a>
<ol>
- <li><a href="#add-a-comment"><code>add-a-comment</code></a>
-
- <li><a href="#get-a-bug"><code>get-a-bug</code></a>
+ <li><a href="#add-comment"><code>add-comment</code></a>
<li><a href="#get-all-bugs"><code>get-all-bugs</code></a>
- <li><a href="#get-token-and-login"><code>get-token-and-login</code></a>
+ <li><a href="#get-bug"><code>get-bug</code></a>
- <li><a href="#open-a-bug"><code>open-a-bug</code></a>
+ <li><a href="#open-bug"><code>open-bug</code></a>
- <li><a href="#update-a-bug"><code>update-a-bug</code></a>
+ <li><a href="#update-bug"><code>update-bug</code></a>
</ol>
<li><a href="#ack">Acknowledgements</a>
@@ -63,34 +61,22 @@
LAUNCHPAD together with this documentation can be downloaded from <a
href="http://common-lisp.net/project/cl-launchpad/cl-launchpad_latest.tar.gz">http://common-lisp.net/project/cl-launchpad/cl-launchpad_latest.tar.gz</a>. The
-current version is 0.4.
+current version is 0.5.
<br>&nbsp;<br><h3><a class=none name="dictionary">The LAUNCHPAD dictionary</a></h3>
-<!-- Entry for ADD-A-COMMENT -->
+<!-- Entry for ADD-COMMENT -->
-<p><br>[Function]<br><a class=none name='add-a-comment'><b>add-a-comment</b> <i>bug-id comment</i> =&gt; <i>result</i></a>
+<p><br>[Function]<br><a class=none name='add-comment'><b>add-comment</b> <i>bug-id comment</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
-<!-- End of entry for ADD-A-COMMENT -->
-
-
-<!-- Entry for GET-A-BUG -->
-
-<p><br>[Function]<br><a class=none name='get-a-bug'><b>get-a-bug</b> <i>bug-id</i> =&gt; <i>result</i></a>
-<blockquote><br>
-
-
-
-</blockquote>
-
-<!-- End of entry for GET-A-BUG -->
+<!-- End of entry for ADD-COMMENT -->
<!-- Entry for GET-ALL-BUGS -->
@@ -105,43 +91,40 @@
<!-- End of entry for GET-ALL-BUGS -->
-<!-- Entry for GET-TOKEN-AND-LOGIN -->
+<!-- Entry for GET-BUG -->
-<p><br>[Function]<br><a class=none name='get-token-and-login'><b>get-token-and-login</b> <i>user-name</i> =&gt; <i>result</i></a>
+<p><br>[Function]<br><a class=none name='get-bug'><b>get-bug</b> <i>bug-id</i> =&gt; <i>result</i></a>
<blockquote><br>
-Get a request token and let user approve it, then exchange it to
- get a permanent request token which will be used to sign your
- requests. Save user-name and token in ~/.oauth, so load token for
- existed user directly in the future.
+
</blockquote>
-<!-- End of entry for GET-TOKEN-AND-LOGIN -->
+<!-- End of entry for GET-BUG -->
-<!-- Entry for OPEN-A-BUG -->
+<!-- Entry for OPEN-BUG -->
-<p><br>[Function]<br><a class=none name='open-a-bug'><b>open-a-bug</b> <i>project title description</i> =&gt; <i>result</i></a>
+<p><br>[Function]<br><a class=none name='open-bug'><b>open-bug</b> <i>project title description</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
-<!-- End of entry for OPEN-A-BUG -->
+<!-- End of entry for OPEN-BUG -->
-<!-- Entry for UPDATE-A-BUG -->
+<!-- Entry for UPDATE-BUG -->
-<p><br>[Function]<br><a class=none name='update-a-bug'><b>update-a-bug</b> <i>bug-id <tt>&amp;key</tt> title description</i> =&gt; <i>result</i></a>
+<p><br>[Function]<br><a class=none name='update-bug'><b>update-bug</b> <i>bug-id <tt>&amp;key</tt> title description</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
-<!-- End of entry for UPDATE-A-BUG -->
+<!-- End of entry for UPDATE-BUG -->
<br>&nbsp;<br><h3><a class=none name="ack">Acknowledgements</a></h3>
@@ -150,6 +133,6 @@
This documentation was prepared with <a href="http://weitz.de/documentation-template/">DOCUMENTATION-TEMPLATE</a>.
</p>
<p>
-Last modified: 2009/12/12 11:42:54
+Last modified: 2009/12/20 22:03:42
</body>
</html>
View
@@ -4,15 +4,15 @@
(defparameter bug-id 1)
-(launchpad:get-token-and-login project)
+(launchpad:login project)
(launchpad:get-all-bugs project)
-(setf bug-id (launchpad:open-a-bug project "test" "just testing"))
+(setf bug-id (launchpad:open-bug project "test" "just testing"))
-(launchpad:update-a-bug bug-id :title "modify test" :description "modify just testing")
+(launchpad:update-bug bug-id :title "modify test" :description "modify just testing")
-(launchpad:get-a-bug bug-id)
+(launchpad:get-bug bug-id)
-(launchpad:add-a-comment 483637 "test adding a comment")
+(launchpad:add-comment 483637 "test adding a comment")
View
@@ -1,6 +1,6 @@
;;;; -*- Mode: LISP; -*-
(asdf:defsystem :launchpad
- :version "0.4"
+ :version "0.5"
:serial t
:author "Plato Wu <gtalk000@gmail.com>"
:license "MIT"
View
@@ -52,7 +52,7 @@
(get-entry (format nil "https://api.edge.launchpad.net/beta/~a" project)
:parameters '(("ws.op" . "searchTasks"))))
-(defun open-a-bug (project title description)
+(defun open-bug (project title description)
(multiple-value-bind (body status header)
(post-entry "https://api.edge.launchpad.net/beta/bugs"
`(("ws.op" . "createBug")
@@ -64,17 +64,17 @@
(error "Create failed ~A!" header))
(parse-integer (subseq (cdr (assoc :location header)) 41))))
-(defun update-a-bug (bug-id &key title description)
+(defun update-bug (bug-id &key title description)
(multiple-value-bind (body status header)
(modify-entry (format nil "https://api.edge.launchpad.net/beta/bugs/~a" bug-id)
(list (cons "title" title) (cons "description" description)))
(if (not (= status 209))
(cerror "update failed!" "Ignore it?"))))
-(defun get-a-bug (bug-id)
+(defun get-bug (bug-id)
(get-entry (format nil "https://api.edge.launchpad.net/beta/bugs/~a" bug-id)))
-(defun add-a-comment (bug-id comment)
+(defun add-comment (bug-id comment)
(post-entry (format nil "https://api.edge.launchpad.net/beta/bugs/~a" bug-id)
`(("ws.op" . "newMessage")
("content" . ,comment))))
View
@@ -35,7 +35,7 @@ See HyperSpec/Body/25_adb.htm"
(setf weak-oauth-token (second responses))
(setf weak-oauth-token-secret (fourth responses))))
-(defun get-token-and-login (user-name)
+(defun login (user-name)
"Get a request token and let user approve it, then exchange it to
get a permanent request token which will be used to sign your
requests. Save user-name and token in ~/.oauth, so load token for
@@ -51,7 +51,7 @@ See HyperSpec/Body/25_adb.htm"
(when (string= (car line) user-name)
(setf oauth-token (second line))
(setf oauth-token-secret (third line))
- (return-from get-token-and-login)))
+ (return-from login)))
(get-request-token)
(format t "The authorization page
(https://edge.launchpad.net/+authorize-token?oauth_token=~a)
View
@@ -1,5 +1,5 @@
(defpackage :launchpad
(:documentation "A Common LISP library for lauchpad.net")
(:use :cl :drakma :cl-ppcre :json)
- (:export :get-token-and-login :get-all-bugs :get-a-bug :open-a-bug :update-a-bug :add-a-comment))
+ (:export :get-token-and-login :get-all-bugs :get-bug :open-bug :update-bug :add-comment))

0 comments on commit ec819f8

Please sign in to comment.