2006-10-22 OHASHI Akira <bg66@koka-in.org>
+ * mixi.el (mixi-make-community): New slot `members'.
+ (mixi-community-members): New accessor method.
+ (mixi-community-set-members): Ditto.
+ (mixi-community-members-regexp): New constant.
+ (mixi-community-realize): Use them.
+
+ * mixi.el (mixi-make-community): New slot `open level'.
+ (mixi-community-open-level): New accessor method.
+ (mixi-community-set-open-level): Ditto.
+ (mixi-community-open-level-regexp): New constant.
+ (mixi-community-realize): Use them.
+
+ * mixi.el (mixi-make-community): New slot `authority'.
+ (mixi-community-authority): New accessor method.
+ (mixi-community-set-authority): Ditto.
+ (mixi-community-authority-regexp): New constant.
+ (mixi-community-realize): Use them.
+
+2006-10-22 OHASHI Akira <bg66@koka-in.org>
+
* mixi.el (mixi-make-friend): New slot `sex'.
(mixi-friend-sex): New accessor method.
(mixi-friend-set-sex): Ditto.
(defun mixi-make-community (id &optional name)
"Return a community object."
(mixi-make-cache id (cons 'mixi-community (vector nil id name nil nil nil
- nil))
+ nil nil nil nil))
mixi-community-cache))
(defmacro mixi-community-p (community)
"<td BGCOLOR=#F2DDB7><font COLOR=#996600>´ÉÍý¿Í</font></td>\n<td>\n\n<a href=\"\\(home\\.pl\\|show_friend\\.pl\\?id=\\([0-9]+\\)\\)\">\n\\(.+\\)</a>")
(defconst mixi-community-category-regexp
"<td BGCOLOR=#F2DDB7><font COLOR=#996600>¥«¥Æ¥´¥ê</font></td>\n<td>\\([^<]+\\)</td>")
+(defconst mixi-community-members-regexp
+ "<td BGCOLOR=#F2DDB7><font COLOR=#996600>¥á¥ó¥Ð¡¼¿ô</font></td>\n<td>\\([0-9]+\\)¿Í</td></tr>")
+(defconst mixi-community-open-level-regexp
+ "<td BGCOLOR=#F2DDB7><font COLOR=#996600>»²²Ã¾ò·ï¤È<br>¸ø³«¥ì¥Ù¥ë</font></td>
+<td>\\(.+\\)</td></tr>")
+(defconst mixi-community-authority-regexp
+ "<td BGCOLOR=#F2DDB7><font COLOR=#996600>¥È¥Ô¥Ã¥¯ºîÀ®¤Î¸¢¸Â</font></td>\n<td>\\(.+\\)</td></tr>")
(defconst mixi-community-description-regexp
"<td CLASS=h120>\\(.+\\)</td>")
(if (string-match mixi-community-category-regexp buffer)
(mixi-community-set-category community (match-string 1 buffer))
(signal 'error (list 'cannot-find-category community)))
+ (if (string-match mixi-community-members-regexp buffer)
+ (mixi-community-set-members
+ community (string-to-number (match-string 1 buffer)))
+ (signal 'error (list 'cannot-find-members community)))
+ (if (string-match mixi-community-open-level-regexp buffer)
+ (mixi-community-set-open-level community (match-string 1 buffer))
+ (signal 'error (list 'cannot-find-open-level community)))
+ (if (string-match mixi-community-authority-regexp buffer)
+ (mixi-community-set-authority community (match-string 1 buffer))
+ (signal 'error (list 'cannot-find-authority community)))
(if (string-match mixi-community-description-regexp buffer)
- (mixi-community-set-description community (match-string 1 buffer))
+ (mixi-community-set-description
+ community (mixi-remove-markup (match-string 1 buffer)))
(signal 'error (list 'cannot-find-description community)))))
(mixi-community-touch community)))
(mixi-community-realize community)
(aref (cdr community) 5))
+(defun mixi-community-members (community)
+ "Return the members of COMMUNITY."
+ (unless (mixi-community-p community)
+ (signal 'wrong-type-argument (list 'mixi-community-p community)))
+ (mixi-community-realize community)
+ (aref (cdr community) 6))
+
+(defun mixi-community-open-level (community)
+ "Return the open-level of COMMUNITY."
+ (unless (mixi-community-p community)
+ (signal 'wrong-type-argument (list 'mixi-community-p community)))
+ (mixi-community-realize community)
+ (aref (cdr community) 7))
+
+(defun mixi-community-authority (community)
+ "Return the authority of COMMUNITY."
+ (unless (mixi-community-p community)
+ (signal 'wrong-type-argument (list 'mixi-community-p community)))
+ (mixi-community-realize community)
+ (aref (cdr community) 8))
+
(defun mixi-community-description (community)
"Return the description of COMMUNITY."
(unless (mixi-community-p community)
(signal 'wrong-type-argument (list 'mixi-community-p community)))
(mixi-community-realize community)
- (aref (cdr community) 6))
+ (aref (cdr community) 9))
(defun mixi-community-touch (community)
"Set the timestamp of COMMUNITY."
(signal 'wrong-type-argument (list 'mixi-community-p community)))
(aset (cdr community) 5 category))
+(defun mixi-community-set-members (community members)
+ "Set the name of COMMUNITY."
+ (unless (mixi-community-p community)
+ (signal 'wrong-type-argument (list 'mixi-community-p community)))
+ (aset (cdr community) 6 members))
+
+(defun mixi-community-set-open-level (community open-level)
+ "Set the name of COMMUNITY."
+ (unless (mixi-community-p community)
+ (signal 'wrong-type-argument (list 'mixi-community-p community)))
+ (aset (cdr community) 7 open-level))
+
+(defun mixi-community-set-authority (community authority)
+ "Set the name of COMMUNITY."
+ (unless (mixi-community-p community)
+ (signal 'wrong-type-argument (list 'mixi-community-p community)))
+ (aset (cdr community) 8 authority))
+
(defun mixi-community-set-description (community description)
"Set the name of COMMUNITY."
(unless (mixi-community-p community)
(signal 'wrong-type-argument (list 'mixi-community-p community)))
- (aset (cdr community) 6 description))
+ (aset (cdr community) 9 description))
(defmacro mixi-community-list-page (&optional friend)
`(concat "/list_community.pl?page=%d"