From: bg66 Date: Wed, 26 Dec 2007 09:53:04 +0000 (+0000) Subject: (mixi-recommended-friend-list-page): New macro. X-Git-Tag: mixi-el-1_1_0~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=79aef5c117506ffc6654b421236818db9b55556f;p=elisp%2Fmixi.git (mixi-recommended-friend-list-page): New macro. (mixi-recommended-friend-list-regexp): New constant. (mixi-get-recommended-friends): New function. (mixi-recommended-community-list-page): New alias. (mixi-recommended-community-list-regexp): New constant. (mixi-get-recommended-communities): New function. --- diff --git a/ChangeLog b/ChangeLog index a6f4105..fafa1b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-12-26 OHASHI Akira + + * mixi.el (mixi-recommended-friend-list-page): New macro. + (mixi-recommended-friend-list-regexp): New constant. + (mixi-get-recommended-friends): New function. + (mixi-recommended-community-list-page): New alias. + (mixi-recommended-community-list-regexp): New constant. + (mixi-get-recommended-communities): New function. + 2007-12-21 OHASHI Akira * configure.ac: Use modern AC_INIT. diff --git a/mixi-ja.texi b/mixi-ja.texi index 706ec7d..f610765 100755 --- a/mixi-ja.texi +++ b/mixi-ja.texi @@ -755,6 +755,23 @@ friend $B%*%V%8%'%/%H$H?tCM$OF1;~$K;XDj$9$k$3$H$b$G$-$^$9!#(B @end cartouche @end defun +@defun mixi-get-recommended-friends &optional range +$B$*$9$9$a%^%$%_%/%7%#0lMw$rl9g$O:GBg$G$3$N?t$N$*$9$9$a%^%$%_%/%7%#$N$_$rl9g$O:GBg$G$3$N?t$N$*$9$9$a%3%_%e%K%F%#$N$_$r]+>.+\\(.+?\\)¤µ¤ó([0-9]+)") + +;;;###autoload +(defun mixi-get-recommended-friends (&optional range) + "Get recommended friends." + (let ((items (mixi-get-matched-items (mixi-recommended-friend-list-page) + mixi-recommended-friend-list-regexp + range))) + (mapcar (lambda (item) + (mixi-make-friend (nth 0 item) (nth 1 item))) + items))) + ;; Diary object. (defvar mixi-diary-cache (make-hash-table :test 'equal)) (defun mixi-make-diary (owner id &optional comment-count time title content) @@ -1701,6 +1720,23 @@ Increase this value when unexpected error frequently occurs." (mixi-make-community (nth 0 item) (nth 1 item))) items))) +;; Recommended community. +(defalias 'mixi-recommended-community-list-page + 'mixi-recommended-friend-list-page) + +(defconst mixi-recommended-community-list-regexp + "\\(.+\\)([0-9]+)") + +;;;###autoload +(defun mixi-get-recommended-communities (&optional range) + "Get recommended communities." + (let ((items (mixi-get-matched-items (mixi-recommended-community-list-page) + mixi-recommended-community-list-regexp + range))) + (mapcar (lambda (item) + (mixi-make-community (nth 0 item) (nth 1 item))) + items))) + ;; Topic object. (defvar mixi-topic-cache (make-hash-table :test 'equal)) (defun mixi-make-topic (community id &optional comment-count time title owner