;; * mixi-get-news
;; * mixi-get-releases
;; * mixi-get-echoes (limited)
+;; * mixi-get-new-echoes (limited)
;;
;; APIs for posting:
;;
;; at run-time.
(eval-when-compile
(defvar w3m-use-cookies)
- (defvar url-request-method)
- (defvar url-request-data)
- (defvar url-request-extra-headers)
- (defvar url-show-status)
(autoload 'w3m-decode-buffer "w3m")
(autoload 'w3m-retrieve "w3m")
(autoload 'url-retrieve-synchronously "url"))
-(defconst mixi-revision "$Revision: 1.190 $")
+(defconst mixi-revision "$Revision: 1.198 $")
(defgroup mixi nil
"API library for accessing to mixi."
¿·¤ÏÀ©¸Â¤µ¤»¤Æ¤¤¤¿¤À¤¤¤Æ¤ª¤ê¤Þ¤¹¡£¤´ÌÂÏǤò¤ª¤«¤±¤¤¤¿¤·¤Þ¤¹¤¬¡¢¤·¤Ð¤é¤¯¤ª<br>
ÂÔ¤Á¤¤¤¿¤À¤¤¤Æ¤«¤éÁàºî¤ò¤ª¤³¤Ê¤Ã¤Æ¤¯¤À¤µ¤¤¡£")
(defconst mixi-warning-continuously-accessing
- "´Ö³Ö¤ò¶õ¤±¤Ê¤¤Ï¢Â³Åª¤Ê¥Ú¡¼¥¸¤ÎÁ«°Ü¡¦¹¹¿·¤òÉÑÈˤˤª¤³¤Ê¤ï¤ì¤Æ¤¤¤ë¤³¤È¤¬¸«<br>
-¼õ¤±¤é¤ì¤Þ¤·¤¿¤Î¤Ç¡¢°ì»þŪ¤ËÁàºî¤òÄä»ß¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹¡£¿½¤·Ìõ¤´¤¶¤¤¤Þ<br>
-¤»¤ó¤¬¡¢¤·¤Ð¤é¤¯¤Î´Ö¤ªÂÔ¤Á¤¯¤À¤µ¤¤¡£")
+ "´Ö³Ö¤ò¶õ¤±¤Ê¤¤Ï¢Â³Åª¤Ê¥Ú¡¼¥¸¤ÎÁ«°Ü¡¦¹¹¿·¤òÉÑÈˤˤª¤³¤Ê¤ï¤ì¤Æ¤¤¤ë¤³¤È¤¬¸«¼õ¤±¤é¤ì¤Þ¤·¤¿¤Î¤Ç¡¢°ì»þŪ¤ËÁàºî¤òÄä»ß¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹¡£¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¤¬¡¢¤·¤Ð¤é¤¯¤Î´Ö¤ªÂÔ¤Á¤¯¤À¤µ¤¤¡£")
(defmacro mixi-retrieve (url &optional post-data)
`(funcall (intern (concat "mixi-" (symbol-name mixi-backend) "-retrieve"))
(signal 'wrong-type-argument (list 'mixi-friend-p friend)))
(aset (cdr friend) 13 profile))
-(defmacro mixi-friend-list-page (&optional friend)
- `(concat "/list_friend.pl?page=%d"
- (when ,friend (concat "&id=" (mixi-friend-id ,friend)))))
+(defun mixi-my-friend-list-page (&optional dummy)
+ (concat "/list_friend_simple.pl?page=%d"))
+
+(defun mixi-friend-list-page (friend)
+ (concat "/list_friend.pl?page=%d&id=" (mixi-friend-id friend)))
(defconst mixi-friend-list-id-regexp
"<a href=\"?show_friend\\.pl\\?id=\\([0-9]+\\)\"?")
+(defconst mixi-my-friend-list-nick-regexp
+ "<p>\\(.+\\)([0-9]+)</p>")
(defconst mixi-friend-list-nick-regexp
"<span>\\(.+\\)¤µ¤ó([0-9]+)</span>")
(setq range (nth 0 friend-or-range)))
(unless (or (null friend) (mixi-friend-p friend))
(signal 'wrong-type-argument (list 'mixi-friend-p friend)))
- (let ((ids (mixi-get-matched-items (mixi-friend-list-page friend)
- mixi-friend-list-id-regexp
- range))
- (nicks (mixi-get-matched-items (mixi-friend-list-page friend)
- mixi-friend-list-nick-regexp
- range)))
- (let ((index 0)
- ret)
- (while (< index (length ids))
- (setq ret (cons (mixi-make-friend (nth 0 (nth index ids))
- (nth 0 (nth index nicks))) ret))
- (incf index))
- (reverse ret)))))
+ (let (list-page list-nick-regexp)
+ (if (or (null friend) (equal friend mixi-me))
+ (setq list-page 'mixi-my-friend-list-page
+ list-nick-regexp mixi-my-friend-list-nick-regexp)
+ (setq list-page 'mixi-friend-list-page
+ list-nick-regexp mixi-friend-list-nick-regexp))
+ (let ((ids (mixi-get-matched-items (funcall list-page friend)
+ mixi-friend-list-id-regexp
+ range))
+ (nicks (mixi-get-matched-items (funcall list-page friend)
+ list-nick-regexp
+ range)))
+ (let ((index 0)
+ ret)
+ (while (< index (length ids))
+ (setq ret (cons (mixi-make-friend (nth 0 (nth index ids))
+ (nth 0 (nth index nicks))) ret))
+ (incf index))
+ (reverse ret))))))
;; Favorite.
(defmacro mixi-favorite-list-page ()
"&owner_id=" (mixi-friend-id (mixi-diary-owner ,diary))))
(defconst mixi-diary-closed-regexp
- "<td>ͧ¿Í\\(¤Îͧ¿Í\\)?¤Þ¤Ç¸ø³«¤Î¤¿¤áÆɤळ¤È¤¬½ÐÍè¤Þ¤»¤ó¡£</td>")
+ "¤³¤ÎÆüµ¤Ë¥¢¥¯¥»¥¹¤Ç¤¤Þ¤»¤ó¡£°Ê²¼¤Î²ÄǽÀ¤¬¹Í¤¨¤é¤ì¤Þ¤¹¡£<br />")
(defconst mixi-diary-owner-nick-regexp
"<div class=\"diaryTitle\\(Friend\\)? clearfix\">
<h2>\\(.+?\\)\\(¤µ¤ó\\)?¤ÎÆüµ</h2>")
\\(
| <a href=\"delete_comment\\.pl\\?diary_id=[0-9]+&owner_id=[0-9]+&comment_id=.+&type=comment\">¼«Ê¬¤Î¥³¥á¥ó¥È¤òºï½ü¤¹¤ë</a>
\\|\\)</span>
-
+*
<span class=\"commentTitleDate\">\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\)</span>
</dt>
-+
+*
<dd>
\\(\\(.\\|\r?\n\\)*?\\)
</dd>
mixi-news-cache))
(defconst mixi-news-url-regexp
- "/view_news\\.pl\\?id=\\([0-9]+\\)&media_id=\\([0-9]+\\)")
+ "/view_news\\.pl\\?\\(id=\\([0-9]+\\)&media_id=\\([0-9]+\\)\\|media_id=\\([0-9]+\\)&id=\\([0-9]+\\)\\)")
(defun mixi-make-news-from-url (url)
"Return a news object from URL."
(when (string-match mixi-news-url-regexp url)
- (let ((id (match-string 1 url))
- (media-id (match-string 2 url)))
+ (let ((id (or (match-string 2 url) (match-string 5 url)))
+ (media-id (or (match-string 3 url) (match-string 4 url))))
(mixi-make-news media-id id))))
(defmacro mixi-news-p (news)