Commit 3438a269f58750fc2f8136f31c4f34ba80f48e43

Greg Pfeil 2011-03-18T23:02:43

Added PROFILE-URL, because the callback parameter makes no sense if you're not going to embed the URL in a Web page.

diff --git a/gravatar.lisp b/gravatar.lisp
index 63c423b..acedcbc 100644
--- a/gravatar.lisp
+++ b/gravatar.lisp
@@ -35,14 +35,15 @@
                                                                 :utf-8))
                    +base-uri+))
 
-(defun profile (email &optional js-callback)
+(defun profile-url (email js-callback)
+  (generate-profile-url email
+                        :json
+                        (when js-callback `(("callback" . ,js-callback)))))
+
+(defun profile (email)
   (json:decode-json-from-string
-   (babel:octets-to-string
-    (drakma:http-request (generate-profile-url
-                          email
-                          :json
-                          (when js-callback
-                            `(("callback" . ,js-callback))))))))
+   (babel:octets-to-string (drakma:http-request (generate-profile-url email
+                                                                      nil)))))
 
 (defun qr-code-url (email &optional size)
   (generate-profile-url email
diff --git a/package.lisp b/package.lisp
index c165ffe..a14598f 100644
--- a/package.lisp
+++ b/package.lisp
@@ -1,3 +1,3 @@
 (defpackage gravatar
   (:use #:cl)
-  (:export #:image-url #:profile #:qr-code-url))
+  (:export #:image-url #:profile #:profile-url #:qr-code-url))