From: bg66 Date: Mon, 11 Dec 2006 04:00:26 +0000 (+0000) Subject: * mixi.el (mixi-search-bbs-list-page): New macro. X-Git-Tag: mixi-el-1_0_0~166 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a599affc47176b92fd591368feb9c214ffd3d400;p=elisp%2Fmixi.git * mixi.el (mixi-search-bbs-list-page): New macro. (mixi-search-bbs-list-regexp): New regexp. (mixi-search-bbses): New function. --- diff --git a/ChangeLog b/ChangeLog index ded4967..4cdb26e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-12-11 OHASHI Akira + * mixi.el (mixi-search-bbs-list-page): New macro. + (mixi-search-bbs-list-regexp): New regexp. + (mixi-search-bbses): New function. + +2006-12-11 OHASHI Akira + * mixi.el (mixi-search-community-list-page): New macro. (mixi-search-community-list-regexp): New regexp. (mixi-search-communities): New function. diff --git a/mixi.el b/mixi.el index c637213..5598500 100644 --- a/mixi.el +++ b/mixi.el @@ -36,6 +36,7 @@ ;; * mixi-search-communities ;; * mixi-get-bbses ;; * mixi-get-new-bbses +;; * mixi-search-bbses ;; * mixi-get-comments ;; * mixi-get-new-comments ;; * mixi-get-messages @@ -1753,6 +1754,28 @@ Increase this value when unexpected error frequently occurs." (nth 1 item))))) items))) +(defmacro mixi-search-bbs-list-page (keyword) + `(concat "/search_topic.pl?page=%d&type=top&submit=search" + "&keyword=" (mixi-url-encode-and-quote-percent-string keyword) + "&community_id=0&category_id=0")) + +(defconst mixi-search-bbs-list-regexp + "¾ÜºÙ¤ò¸«¤ë") + +;; FIXME: Support community and category. +(defun mixi-search-bbses (keyword &optional range) + (let ((items (mixi-get-matched-items (mixi-search-bbs-list-page keyword) + mixi-search-bbs-list-regexp + range))) + (mapcar (lambda (item) + (let ((name (nth 0 item))) + (when (string= name "bbs") + (setq name "topic")) + (let ((func (intern (concat "mixi-make-" name)))) + (funcall func (mixi-make-community (nth 2 item)) + (nth 1 item))))) + items))) + ;; Comment object. (defun mixi-make-comment (parent owner time content) "Return a comment object."