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))