Index: lang/elisp/wassr-mode/trunk/wassr-mode.el
===================================================================
--- lang/elisp/wassr-mode/trunk/twittering-mode.el (revision 47)
+++ lang/elisp/wassr-mode/trunk/wassr-mode.el (revision 54)
@@ -1,6 +1,5 @@
-;;; twittering-mode.el --- Major mode for Twitter
-
-;; Copyright (C) 2007 Yuto Hayamizu.
-;;               2008 Tsuyoshi CHO
+;;; wassr-mode.el --- Major mode for Wassr
+
+;; Copyright (C) 2008 Tsuyoshi CHO
 
 ;; Author: Y. Hayamizu <y.hayamizu@gmail.com>
@@ -8,6 +7,6 @@
 ;; Created: Sep 4, 2007
 ;; Version: 0.4
-;; Keywords: twitter web
-;; URL: http://lambdarepos.svnrepository.com/share/trac.cgi/browser/lang/elisp/twittering-mode
+;; Keywords: wassr web
+;; URL: 
 
 ;; This file is free software; you can redistribute it and/or modify
@@ -28,15 +27,8 @@
 ;;; Commentary:
 
-;; twittering-mode.el is a major mode for Twitter.
+;; wassr-mode.el based on wassr-mode.el is a major mode for Wassr.
 ;; You can check friends timeline, and update your status on Emacs.
 
 ;;; Feature Request:
-
-;; URL : http://twitter.com/d00dle/statuses/577876082
-;; URL : http://twitter.com/d00dle/statuses/577879732
-;; * Status Input from Popup buffer and C-cC-c to POST.
-;; * Mark fav(star)
-;; URL : http://code.nanigac.com/source/view/419
-;; * update status for region
 
 ;;; Code:
@@ -46,35 +38,35 @@
 (require 'parse-time)
 
-(defconst twittering-mode-version "0.5")
-
-(defun twittering-mode-version ()
-  "Display a message for twittering-mode version."
+(defconst wassr-mode-version "0.1")
+
+(defun wassr-mode-version ()
+  "Display a message for wassr-mode version."
   (interactive)
   (let ((version-string
-	 (format "twittering-mode-v%s" twittering-mode-version)))
+	 (format "wassr-mode-v%s" wassr-mode-version)))
     (if (interactive-p)
 	(message "%s" version-string)
       version-string)))
 
-(defvar twittering-mode-map (make-sparse-keymap))
-
-(defvar twittering-timer nil "Timer object for timeline refreshing will be stored here. DO NOT SET VALUE MANUALLY.")
-
-(defvar twittering-idle-time 20)
-
-(defvar twittering-timer-interval 90)
-
-(defvar twittering-username nil)
-
-(defvar twittering-password nil)
-
-(defvar twittering-scroll-mode nil)
-(make-variable-buffer-local 'twittering-scroll-mode)
-
-(defvar twittering-jojo-mode nil)
-(make-variable-buffer-local 'twittering-jojo-mode)
-
-(defvar twittering-status-format nil)
-(setq twittering-status-format "%i %s,  %@:\n  %t // from %f%L")
+(defvar wassr-mode-map (make-sparse-keymap))
+
+(defvar wassr-timer nil "Timer object for timeline refreshing will be stored here. DO NOT SET VALUE MANUALLY.")
+
+(defvar wassr-idle-time 20)
+
+(defvar wassr-timer-interval 90)
+
+(defvar wassr-username nil)
+
+(defvar wassr-password nil)
+
+(defvar wassr-scroll-mode nil)
+(make-variable-buffer-local 'wassr-scroll-mode)
+
+(defvar wassr-jojo-mode nil)
+(make-variable-buffer-local 'wassr-jojo-mode)
+
+(defvar wassr-status-format nil)
+(setq wassr-status-format "%i %s,  %@:\n  %t // from %f%L")
 ;; %s - screen_name
 ;; %S - name
@@ -94,18 +86,18 @@
 ;; %# - id
 
-(defvar twittering-buffer "*twittering*")
-(defun twittering-buffer ()
-  (twittering-get-or-generate-buffer twittering-buffer))
-
-(defvar twittering-http-buffer "*twittering-http-buffer*")
-(defun twittering-http-buffer ()
-  (twittering-get-or-generate-buffer twittering-http-buffer))
-
-(defvar twittering-friends-timeline-data nil)
-
-(defvar twittering-username-face 'twittering-username-face)
-(defvar twittering-uri-face 'twittering-uri-face)
-
-(defun twittering-get-or-generate-buffer (buffer)
+(defvar wassr-buffer "*wassr*")
+(defun wassr-buffer ()
+  (wassr-get-or-generate-buffer wassr-buffer))
+
+(defvar wassr-http-buffer "*wassr-http-buffer*")
+(defun wassr-http-buffer ()
+  (wassr-get-or-generate-buffer wassr-http-buffer))
+
+(defvar wassr-friends-timeline-data nil)
+
+(defvar wassr-username-face 'wassr-username-face)
+(defvar wassr-uri-face 'wassr-uri-face)
+
+(defun wassr-get-or-generate-buffer (buffer)
   (if (bufferp buffer)
       (if (buffer-live-p buffer)
@@ -122,50 +114,50 @@
 
 ;;; Proxy
-(defvar twittering-proxy-use nil)
-(defvar twittering-proxy-server nil)
-(defvar twittering-proxy-port 8080)
-(defvar twittering-proxy-user nil)
-(defvar twittering-proxy-password nil)
-
-(defun twittering-toggle-proxy () ""
-  (interactive)
-  (setq twittering-proxy-use
-	(not twittering-proxy-use))
+(defvar wassr-proxy-use nil)
+(defvar wassr-proxy-server nil)
+(defvar wassr-proxy-port 8080)
+(defvar wassr-proxy-user nil)
+(defvar wassr-proxy-password nil)
+
+(defun wassr-toggle-proxy () ""
+  (interactive)
+  (setq wassr-proxy-use
+	(not wassr-proxy-use))
   (message "%s %s"
 	   "Use Proxy:"
-	   (if twittering-proxy-use
+	   (if wassr-proxy-use
 	       "on" "off")))
 
-(defun twittering-user-agent-default-function ()
-  "Twittering mode default User-Agent function."
+(defun wassr-user-agent-default-function ()
+  "Wassr mode default User-Agent function."
   (concat "Emacs/"
 	  (int-to-string emacs-major-version) "." (int-to-string
 						   emacs-minor-version)
 	  " "
-	  "Twittering-mode/"
-	  twittering-mode-version))
-
-(defvar twittering-user-agent-function 'twittering-user-agent-default-function)
-
-(defun twittering-user-agent ()
+	  "Wassr-mode/"
+	  wassr-mode-version))
+
+(defvar wassr-user-agent-function 'wassr-user-agent-default-function)
+
+(defun wassr-user-agent ()
   "Return User-Agent header string."
-  (funcall twittering-user-agent-function))
+  (funcall wassr-user-agent-function))
 
 ;;; to show image files
 
-(defvar twittering-wget-buffer "*twittering-wget-buffer*")
-(defun twittering-wget-buffer ()
-  (twittering-get-or-generate-buffer twittering-wget-buffer))
-
-(defvar twittering-tmp-dir
-  (expand-file-name (concat "twmode-images-" (user-login-name))
+(defvar wassr-wget-buffer "*wassr-wget-buffer*")
+(defun wassr-wget-buffer ()
+  (wassr-get-or-generate-buffer wassr-wget-buffer))
+
+(defvar wassr-tmp-dir
+  (expand-file-name (concat "wassr-mode-images-" (user-login-name))
 		    temporary-file-directory))
 
-(defvar twittering-icon-mode nil "You MUST NOT CHANGE this variable directory. You should change through function'twittering-icon-mode'")
-(make-variable-buffer-local 'twittering-icon-mode)
-(defun twittering-icon-mode (&optional arg)
-  (interactive)
-  (setq twittering-icon-mode
-	(if twittering-icon-mode
+(defvar wassr-icon-mode nil "You MUST NOT CHANGE this variable directory. You should change through function'wassr-icon-mode'")
+(make-variable-buffer-local 'wassr-icon-mode)
+(defun wassr-icon-mode (&optional arg)
+  (interactive)
+  (setq wassr-icon-mode
+	(if wassr-icon-mode
 	    (if (null arg)
 		nil
@@ -173,28 +165,28 @@
 	  (when (or (null arg)
 		    (and arg (> (prefix-numeric-value arg) 0)))
-	    (when (file-writable-p twittering-tmp-dir)
+	    (when (file-writable-p wassr-tmp-dir)
 	      (progn
-		(if (not (file-directory-p twittering-tmp-dir))
-		    (make-directory twittering-tmp-dir))
+		(if (not (file-directory-p wassr-tmp-dir))
+		    (make-directory wassr-tmp-dir))
 		t)))))
-  (twittering-render-friends-timeline))
-
-(defun twittering-scroll-mode (&optional arg)
-  (interactive)
-  (setq twittering-scroll-mode
+  (wassr-render-friends-timeline))
+
+(defun wassr-scroll-mode (&optional arg)
+  (interactive)
+  (setq wassr-scroll-mode
 	(if (null arg)
-	    (not twittering-scroll-mode)
+	    (not wassr-scroll-mode)
 	  (> (prefix-numeric-value arg) 0))))
 
-(defun twittering-jojo-mode (&optional arg)
-  (interactive)
-  (setq twittering-jojo-mode
+(defun wassr-jojo-mode (&optional arg)
+  (interactive)
+  (setq wassr-jojo-mode
 	(if (null arg)
-	    (not twittering-jojo-mode)
+	    (not wassr-jojo-mode)
 	  (> (prefix-numeric-value arg) 0))))
 
-(defvar twittering-image-stack nil)
-
-(defun twittering-image-type (file-name)
+(defvar wassr-image-stack nil)
+
+(defun wassr-image-type (file-name)
   (cond
    ((string-match "\\.jpe?g" file-name) 'jpeg)
@@ -203,17 +195,17 @@
    (t nil)))
 
-(defun twittering-local-strftime (fmt string)
+(defun wassr-local-strftime (fmt string)
   (format-time-string fmt ; like "%Y-%m-%d %H:%M:%S", shown in localtime
 		      (apply 'encode-time (parse-time-string string))))
 
-(defvar twittering-debug-mode nil)
-(defvar twittering-debug-buffer "*debug*")
-(defun twittering-debug-buffer ()
-  (twittering-get-or-generate-buffer twittering-debug-buffer))
+(defvar wassr-debug-mode nil)
+(defvar wassr-debug-buffer "*debug*")
+(defun wassr-debug-buffer ()
+  (wassr-get-or-generate-buffer wassr-debug-buffer))
 (defmacro debug-print (obj)
   (let ((obsym (gensym)))
     `(let ((,obsym ,obj))
-       (if twittering-debug-mode
-	   (with-current-buffer (twittering-debug-buffer)
+       (if wassr-debug-mode
+	   (with-current-buffer (wassr-debug-buffer)
 	     (insert (prin1-to-string ,obsym))
 	     (newline)
@@ -221,23 +213,23 @@
 	 ,obsym))))
 
-(defun twittering-debug-mode ()
-  (interactive)
-  (setq twittering-debug-mode
-	(not twittering-debug-mode))
-  (message (if twittering-debug-mode "debug mode:on" "debug mode:off")))
-
-(if twittering-mode-map
-    (let ((km twittering-mode-map))
-      (define-key km "\C-c\C-f" 'twittering-friends-timeline)
-      (define-key km "\C-c\C-s" 'twittering-update-status-interactive)
-      (define-key km "\C-c\C-e" 'twittering-erase-old-statuses)
-      (define-key km "\C-m" 'twittering-enter)
-      (define-key km "\C-c\C-l" 'twittering-update-lambda)
-      (define-key km [mouse-1] 'twittering-click)
-      (define-key km "\C-c\C-v" 'twittering-view-user-page)
+(defun wassr-debug-mode ()
+  (interactive)
+  (setq wassr-debug-mode
+	(not wassr-debug-mode))
+  (message (if wassr-debug-mode "debug mode:on" "debug mode:off")))
+
+(if wassr-mode-map
+    (let ((km wassr-mode-map))
+      (define-key km "\C-c\C-f" 'wassr-friends-timeline)
+      (define-key km "\C-c\C-s" 'wassr-update-status-interactive)
+      (define-key km "\C-c\C-e" 'wassr-erase-old-statuses)
+      (define-key km "\C-m" 'wassr-enter)
+      (define-key km "\C-c\C-l" 'wassr-update-lambda)
+      (define-key km [mouse-1] 'wassr-click)
+      (define-key km "\C-c\C-v" 'wassr-view-user-page)
       ;; (define-key km "j" 'next-line)
       ;; (define-key km "k" 'previous-line)
-      (define-key km "j" 'twittering-goto-next-status)
-      (define-key km "k" 'twittering-goto-previous-status)
+      (define-key km "j" 'wassr-goto-next-status)
+      (define-key km "k" 'wassr-goto-previous-status)
       (define-key km "l" 'forward-char)
       (define-key km "h" 'backward-char)
@@ -245,38 +237,38 @@
       (define-key km "^" 'beginning-of-line-text)
       (define-key km "$" 'end-of-line)
-      (define-key km "n" 'twittering-goto-next-status-of-user)
-      (define-key km "p" 'twittering-goto-previous-status-of-user)
+      (define-key km "n" 'wassr-goto-next-status-of-user)
+      (define-key km "p" 'wassr-goto-previous-status-of-user)
       (define-key km [backspace] 'backward-char)
       (define-key km "G" 'end-of-buffer)
       (define-key km "H" 'beginning-of-buffer)
-      (define-key km "i" 'twittering-icon-mode)
-      (define-key km "s" 'twittering-scroll-mode)
-      (define-key km "t" 'twittering-toggle-proxy)
-      (define-key km "\C-c\C-p" 'twittering-toggle-proxy)
+      (define-key km "i" 'wassr-icon-mode)
+      (define-key km "s" 'wassr-scroll-mode)
+      (define-key km "t" 'wassr-toggle-proxy)
+      (define-key km "\C-c\C-p" 'wassr-toggle-proxy)
       nil))
 
-(defvar twittering-mode-syntax-table nil "")
-
-(if twittering-mode-syntax-table
+(defvar wassr-mode-syntax-table nil "")
+
+(if wassr-mode-syntax-table
     ()
-  (setq twittering-mode-syntax-table (make-syntax-table))
-  ;; (modify-syntax-entry ?  "" twittering-mode-syntax-table)
-  (modify-syntax-entry ?\" "w"  twittering-mode-syntax-table)
+  (setq wassr-mode-syntax-table (make-syntax-table))
+  ;; (modify-syntax-entry ?  "" wassr-mode-syntax-table)
+  (modify-syntax-entry ?\" "w"  wassr-mode-syntax-table)
   )
 
-(defun twittering-mode-init-variables ()
+(defun wassr-mode-init-variables ()
   ;; (make-variable-buffer-local 'variable)
   ;; (setq variable nil)
   (font-lock-mode -1)
-  (defface twittering-username-face
+  (defface wassr-username-face
     `((t nil)) "" :group 'faces)
-  (copy-face 'font-lock-string-face 'twittering-username-face)
-  (set-face-attribute 'twittering-username-face nil :underline t)
-  (defface twittering-uri-face
+  (copy-face 'font-lock-string-face 'wassr-username-face)
+  (set-face-attribute 'wassr-username-face nil :underline t)
+  (defface wassr-uri-face
     `((t nil)) "" :group 'faces)
-  (set-face-attribute 'twittering-uri-face nil :underline t)
-  (add-to-list 'minor-mode-alist '(twittering-icon-mode " tw-icon"))
-  (add-to-list 'minor-mode-alist '(twittering-scroll-mode " tw-scroll"))
-  (add-to-list 'minor-mode-alist '(twittering-jojo-mode " tw-jojo"))
+  (set-face-attribute 'wassr-uri-face nil :underline t)
+  (add-to-list 'minor-mode-alist '(wassr-icon-mode " ws-icon"))
+  (add-to-list 'minor-mode-alist '(wassr-scroll-mode " ws-scroll"))
+  (add-to-list 'minor-mode-alist '(wassr-jojo-mode " ws-jojo"))
   )
 
@@ -295,27 +287,27 @@
 ;; If you use Emacs21, decode-char 'ucs will fail unless Mule-UCS is loaded.
 ;; TODO: Show error messages if Emacs 21 without Mule-UCS
-(defmacro twittering-ucs-to-char (num)
+(defmacro wassr-ucs-to-char (num)
   (if (functionp 'ucs-to-char)
       `(ucs-to-char ,num)
     `(decode-char 'ucs ,num)))
 
-(defvar twittering-mode-string "Twittering mode")
-
-(defvar twittering-mode-hook nil
-  "Twittering-mode hook.")
-
-(defun twittering-mode ()
-  "Major mode for Twitter"
-  (interactive)
-  (switch-to-buffer (twittering-buffer))
+(defvar wassr-mode-string "Wassr mode")
+
+(defvar wassr-mode-hook nil
+  "Wassr-mode hook.")
+
+(defun wassr-mode ()
+  "Major mode for Wassr"
+  (interactive)
+  (switch-to-buffer (wassr-buffer))
   (kill-all-local-variables)
-  (twittering-mode-init-variables)
-  (use-local-map twittering-mode-map)
-  (setq major-mode 'twittering-mode)
-  (setq mode-name twittering-mode-string)
-  (set-syntax-table twittering-mode-syntax-table)
-  (run-hooks 'twittering-mode-hook)
+  (wassr-mode-init-variables)
+  (use-local-map wassr-mode-map)
+  (setq major-mode 'wassr-mode)
+  (setq mode-name wassr-mode-string)
+  (set-syntax-table wassr-mode-syntax-table)
+  (run-hooks 'wassr-mode-hook)
   (font-lock-mode -1)
-  (twittering-start)
+  (wassr-start)
   )
 
@@ -324,27 +316,27 @@
 ;;;
 
-(defun twittering-http-get (method-class method &optional sentinel)
-  (if (null sentinel) (setq sentinel 'twittering-http-get-default-sentinel))
+(defun wassr-http-get (method-class method &optional sentinel)
+  (if (null sentinel) (setq sentinel 'wassr-http-get-default-sentinel))
 
   ;; clear the buffer
   (save-excursion
-    (set-buffer (twittering-http-buffer))
+    (set-buffer (wassr-http-buffer))
     (erase-buffer))
 
   (let (proc server port
-	     (proxy-user twittering-proxy-user)
-	     (proxy-password twittering-proxy-password))
+	     (proxy-user wassr-proxy-user)
+	     (proxy-password wassr-proxy-password))
     (condition-case nil
 	(progn
-	  (if (and twittering-proxy-use twittering-proxy-server)
-	      (setq server twittering-proxy-server
-		    port (if (integerp twittering-proxy-port)
-			     (int-to-string twittering-proxy-port)
-			   twittering-proxy-port))
-	    (setq server "twitter.com"
+	  (if (and wassr-proxy-use wassr-proxy-server)
+	      (setq server wassr-proxy-server
+		    port (if (integerp wassr-proxy-port)
+			     (int-to-string wassr-proxy-port)
+			   wassr-proxy-port))
+	    (setq server "api.wassr.jp"
 		  port "80"))
 	  (setq proc
 		(open-network-stream
-		 "network-connection-process" (twittering-http-buffer)
+		 "network-connection-process" (wassr-http-buffer)
 		 server (string-to-number port)))
 	  (set-process-sentinel proc sentinel)
@@ -354,10 +346,10 @@
 		 request)
 	     (setq request
-		   (concat "GET http://twitter.com/" method-class "/" method ".xml HTTP/1.1" nl
-			   "Host: twitter.com" nl
-			   "User-Agent: " (twittering-user-agent) nl
+		   (concat "GET http://api.wassr.jp/" method-class "/" method ".xml HTTP/1.1" nl
+			   "Host: api.wassr.jp" nl
+			   "User-Agent: " (wassr-user-agent) nl
 			   "Authorization: Basic "
 			   (base64-encode-string
-			    (concat twittering-username ":" (twittering-get-password)))
+			    (concat wassr-username ":" (wassr-get-password)))
 			   nl
 			   "Accept: text/xml"
@@ -368,5 +360,5 @@
 			   ",image/png,*/*;q=0.5" nl
 			   "Accept-Charset: utf-8;q=0.7,*;q=0.7" nl
-			   (when twittering-proxy-use
+			   (when wassr-proxy-use
 			     "Proxy-Connection: Keep-Alive" nl
 			     (when (and proxy-user proxy-password)
@@ -383,7 +375,7 @@
        (message "Failure: HTTP GET") nil))))
 
-(defun twittering-http-get-default-sentinel (proc stat &optional suc-msg)
-  (let ((header (twittering-get-response-header))
-	(body (twittering-get-response-body))
+(defun wassr-http-get-default-sentinel (proc stat &optional suc-msg)
+  (let ((header (wassr-get-response-header))
+	(body (wassr-get-response-body))
 	(status nil)
 	)
@@ -395,8 +387,8 @@
 	   (("200 OK")
 	    (mapcar
-	     #'twittering-cache-status-datum
-	     (reverse (twittering-xmltree-to-status
+	     #'wassr-cache-status-datum
+	     (reverse (wassr-xmltree-to-status
 		       body)))
-	    (twittering-render-friends-timeline)
+	    (wassr-render-friends-timeline)
 	    (message (if suc-msg suc-msg "Success: Get.")))
 	   (t (message status))))
@@ -404,6 +396,6 @@
   )
 
-(defun twittering-render-friends-timeline ()
-  (with-current-buffer (twittering-buffer)
+(defun wassr-render-friends-timeline ()
+  (with-current-buffer (wassr-buffer)
     (let ((point (point))
 	  (end (point-max)))
@@ -411,18 +403,18 @@
       (erase-buffer)
       (mapc (lambda (status)
-	      (insert (twittering-format-status
-		       status twittering-status-format))
+	      (insert (wassr-format-status
+		       status wassr-status-format))
 	      (fill-region-as-paragraph
 	       (save-excursion (beginning-of-line) (point)) (point))
 	      (insert "\n"))
-	    twittering-friends-timeline-data)
-      (if twittering-image-stack
+	    wassr-friends-timeline-data)
+      (if wassr-image-stack
 	  (clear-image-cache))
       (setq buffer-read-only t)
       (debug-print (current-buffer))
-      (goto-char (+ point (if twittering-scroll-mode (- (point-max) end) 0))))
+      (goto-char (+ point (if wassr-scroll-mode (- (point-max) end) 0))))
     ))
 
-(defun twittering-format-status (status format-str)
+(defun wassr-format-status (status format-str)
   (flet ((attr (key)
 	       (assocref key status))
@@ -434,14 +426,14 @@
 		(let ((filename (match-string-no-properties 1 profile-image-url)))
 		  ;; download icons if does not exist
-		  (if (file-exists-p (concat twittering-tmp-dir
+		  (if (file-exists-p (concat wassr-tmp-dir
 					     "/" filename))
 		      t
-		    (add-to-list 'twittering-image-stack profile-image-url))
-
-		  (when (and icon-string twittering-icon-mode)
+		    (add-to-list 'wassr-image-stack profile-image-url))
+
+		  (when (and icon-string wassr-icon-mode)
 		    (set-text-properties
 		     1 2 `(display
-			   (image :type ,(twittering-image-type filename)
-				  :file ,(concat twittering-tmp-dir
+			   (image :type ,(wassr-image-type filename)
+				  :file ,(concat wassr-tmp-dir
 						 "/"
 						 filename)))
@@ -488,5 +480,5 @@
 	   (list-push (attr 'created-at) result))
 	  ((?C) ; %C{time-format-str} - created_at (formatted with time-format-str)
-	   (list-push (twittering-local-strftime
+	   (list-push (wassr-local-strftime
 		       (or (match-string-no-properties 2 format-str) "%H:%M:%S")
 		       (attr 'created-at))
@@ -514,10 +506,10 @@
 						   (/ (+ secs 1800) 3600)))
 			   (t (format-time-string "%I:%M %p %B %d, %Y" created-at))))
-	       (setq url (twittering-get-status-url (attr 'user-screen-name) (attr 'id)))
+	       (setq url (wassr-get-status-url (attr 'user-screen-name) (attr 'id)))
 	       ;; make status url clickable
 	       (add-text-properties
 		0 (length time-string)
 		`(mouse-face highlight
-			     face twittering-uri-face
+			     face wassr-uri-face
 			     uri ,url)
 		time-string)
@@ -546,32 +538,32 @@
       )))
 
-(defun twittering-http-post
+(defun wassr-http-post
   (method-class method &optional parameters contents sentinel)
-  "Send HTTP POST request to twitter.com
-
-METHOD-CLASS must be one of Twitter API method classes(statuses, users or direct_messages).
-METHOD must be one of Twitter API method which belongs to METHOD-CLASS.
+  "Send HTTP POST request to api.wassr.jp
+
+METHOD-CLASS must be one of Wassr API method classes(statuses, users or direct_messages).
+METHOD must be one of Wassr API method which belongs to METHOD-CLASS.
 PARAMETERS is alist of URI parameters. ex) ((\"mode\" . \"view\") (\"page\" . \"6\")) => <URI>?mode=view&page=6"
-  (if (null sentinel) (setq sentinel 'twittering-http-post-default-sentinel))
+  (if (null sentinel) (setq sentinel 'wassr-http-post-default-sentinel))
 
   ;; clear the buffer
   (save-excursion
-    (set-buffer (twittering-http-buffer))
+    (set-buffer (wassr-http-buffer))
     (erase-buffer))
 
   (let (proc server port
-	     (proxy-user twittering-proxy-user)
-	     (proxy-password twittering-proxy-password))
+	     (proxy-user wassr-proxy-user)
+	     (proxy-password wassr-proxy-password))
     (progn
-      (if (and twittering-proxy-use twittering-proxy-server)
-	  (setq server twittering-proxy-server
-		port (if (integerp twittering-proxy-port)
-			 (int-to-string twittering-proxy-port)
-		       twittering-proxy-port))
-	(setq server "twitter.com"
+      (if (and wassr-proxy-use wassr-proxy-server)
+	  (setq server wassr-proxy-server
+		port (if (integerp wassr-proxy-port)
+			 (int-to-string wassr-proxy-port)
+		       wassr-proxy-port))
+	(setq server "api.wassr.jp"
 	      port "80"))
       (setq proc
 	    (open-network-stream
-	     "network-connection-process" (twittering-http-buffer)
+	     "network-connection-process" (wassr-http-buffer)
 	     server (string-to-number port)))
       (set-process-sentinel proc sentinel)
@@ -581,23 +573,23 @@
 	     request)
 	 (setq  request
-		(concat "POST http://twitter.com/" method-class "/" method ".xml?"
+		(concat "POST http://api.wassr.jp/" method-class "/" method ".xml?"
 			(if parameters
 			    (mapconcat
 			     (lambda (param-pair)
 			       (format "%s=%s"
-				       (twittering-percent-encode (car param-pair))
-				       (twittering-percent-encode (cdr param-pair))))
+				       (wassr-percent-encode (car param-pair))
+				       (wassr-percent-encode (cdr param-pair))))
 			     parameters
 			     "&"))
 			" HTTP/1.1" nl
-			"Host: twitter.com" nl
-			"User-Agent: " (twittering-user-agent) nl
+			"Host: api.wassr.jp" nl
+			"User-Agent: " (wassr-user-agent) nl
 			"Authorization: Basic "
 			(base64-encode-string
-			 (concat twittering-username ":" (twittering-get-password)))
+			 (concat wassr-username ":" (wassr-get-password)))
 			nl
 			"Content-Type: text/plain" nl
 			"Content-Length: 0" nl
-			(when twittering-proxy-use
+			(when wassr-proxy-use
 			  "Proxy-Connection: Keep-Alive" nl
 			  (when (and proxy-user proxy-password)
@@ -612,9 +604,9 @@
 	 request)))))
 
-(defun twittering-http-post-default-sentinel (proc stat &optional suc-msg)
+(defun wassr-http-post-default-sentinel (proc stat &optional suc-msg)
 
   (condition-case err-signal
-      (let ((header (twittering-get-response-header))
-	    ;; (body (twittering-get-response-body)) not used now.
+      (let ((header (wassr-get-response-header))
+	    ;; (body (wassr-get-response-body)) not used now.
 	    (status nil))
 	(string-match "HTTP/1\.1 \\([a-z0-9 ]+\\)\r?\n" header)
@@ -628,10 +620,10 @@
   )
 
-(defun twittering-get-response-header (&optional buffer)
+(defun wassr-get-response-header (&optional buffer)
   "Exract HTTP response header from HTTP response.
 `buffer' may be a buffer or the name of an existing buffer.
- If `buffer' is omitted, the value of `twittering-http-buffer' is used as `buffer'."
+ If `buffer' is omitted, the value of `wassr-http-buffer' is used as `buffer'."
   (if (stringp buffer) (setq buffer (get-buffer buffer)))
-  (if (null buffer) (setq buffer (twittering-http-buffer)))
+  (if (null buffer) (setq buffer (wassr-http-buffer)))
   (save-excursion
     (set-buffer buffer)
@@ -639,10 +631,10 @@
       (substring content 0 (string-match "\r?\n\r?\n" content)))))
 
-(defun twittering-get-response-body (&optional buffer)
+(defun wassr-get-response-body (&optional buffer)
   "Exract HTTP response body from HTTP response, parse it as XML, and return a XML tree as list.
 `buffer' may be a buffer or the name of an existing buffer.
- If `buffer' is omitted, the value of `twittering-http-buffer' is used as `buffer'."
+ If `buffer' is omitted, the value of `wassr-http-buffer' is used as `buffer'."
   (if (stringp buffer) (setq buffer (get-buffer buffer)))
-  (if (null buffer) (setq buffer (twittering-http-buffer)))
+  (if (null buffer) (setq buffer (wassr-http-buffer)))
   (save-excursion
     (set-buffer buffer)
@@ -654,9 +646,9 @@
       )))
 
-(defun twittering-cache-status-datum (status-datum &optional data-var)
-  "Cache status datum into data-var(default twittering-friends-timeline-data)
+(defun wassr-cache-status-datum (status-datum &optional data-var)
+  "Cache status datum into data-var(default wassr-friends-timeline-data)
 If STATUS-DATUM is already in DATA-VAR, return nil. If not, return t."
   (if (null data-var)
-      (setf data-var 'twittering-friends-timeline-data))
+      (setf data-var 'wassr-friends-timeline-data))
   (let ((id (cdr (assq 'id status-datum))))
     (if (or (null (symbol-value data-var))
@@ -666,6 +658,6 @@
 		  (symbol-value data-var))))
 	(progn
-	  (if twittering-jojo-mode
-	      (twittering-update-jojo (cdr (assq 'user-screen-name status-datum))
+	  (if wassr-jojo-mode
+	      (wassr-update-jojo (cdr (assq 'user-screen-name status-datum))
 				      (cdr (assq 'text status-datum))))
 	  (set data-var (cons status-datum (symbol-value data-var)))
@@ -673,5 +665,5 @@
       nil)))
 
-(defun twittering-status-to-status-datum (status)
+(defun wassr-status-to-status-datum (status)
   (flet ((assq-get (item seq)
 		   (car (cddr (assq item seq)))))
@@ -689,18 +681,18 @@
 
       (setq id (string-to-number (assq-get 'id status-data)))
-      (setq text (twittering-decode-html-entities
+      (setq text (wassr-decode-html-entities
 		  (assq-get 'text status-data)))
-      (setq source (twittering-decode-html-entities
+      (setq source (wassr-decode-html-entities
 		    (assq-get 'source status-data)))
       (setq created-at (assq-get 'created_at status-data))
       (setq truncated (assq-get 'truncated status-data))
       (setq user-id (string-to-number (assq-get 'id user-data)))
-      (setq user-name (twittering-decode-html-entities
+      (setq user-name (wassr-decode-html-entities
 		       (assq-get 'name user-data)))
-      (setq user-screen-name (twittering-decode-html-entities
+      (setq user-screen-name (wassr-decode-html-entities
 			      (assq-get 'screen_name user-data)))
-      (setq user-location (twittering-decode-html-entities
+      (setq user-location (wassr-decode-html-entities
 			   (assq-get 'location user-data)))
-      (setq user-description (twittering-decode-html-entities
+      (setq user-description (wassr-decode-html-entities
 			      (assq-get 'description user-data)))
       (setq user-profile-image-url (assq-get 'profile_image_url user-data))
@@ -712,6 +704,6 @@
        0 (length user-name)
        `(mouse-face highlight
-		    uri ,(concat "http://twitter.com/" user-screen-name)
-		    face twittering-username-face)
+		    uri ,(concat "http://api.wassr.jp/" user-screen-name)
+		    face wassr-username-face)
        user-name)
 
@@ -720,7 +712,7 @@
        0 (length user-screen-name)
        `(mouse-face highlight
-		    face twittering-username-face
-		    uri ,(concat "http://twitter.com/" user-screen-name)
-		    face twittering-username-face)
+		    face wassr-username-face
+		    uri ,(concat "http://api.wassr.jp/" user-screen-name)
+		    face wassr-username-face)
        user-screen-name)
 
@@ -744,8 +736,8 @@
 		 `(mouse-face
 		   highlight
-		   face twittering-uri-face
-		   uri ,(concat "http://twitter.com/" screen-name))
+		   face wassr-uri-face
+		   uri ,(concat "http://api.wassr.jp/" screen-name))
 	       `(mouse-face highlight
-			    face twittering-uri-face
+			    face wassr-uri-face
 			    uri ,uri))
 	     text))
@@ -762,5 +754,5 @@
 	     `(mouse-face highlight
 			  uri ,uri
-			  face twittering-uri-face
+			  face wassr-uri-face
 			  source ,source)
 	     source)
@@ -777,6 +769,6 @@
 	    user-protected)))))
 
-(defun twittering-xmltree-to-status (xmltree)
-  (mapcar #'twittering-status-to-status-datum
+(defun wassr-xmltree-to-status (xmltree)
+  (mapcar #'wassr-status-to-status-datum
 	  ;; quirk to treat difference between xml.el in Emacs21 and Emacs22
 	  ;; On Emacs22, there may be blank strings
@@ -788,5 +780,5 @@
 	    ret)))
 
-(defun twittering-percent-encode (str &optional coding-system)
+(defun wassr-percent-encode (str &optional coding-system)
   (if (or (null coding-system)
 	  (not (coding-system-p coding-system)))
@@ -795,5 +787,5 @@
    (lambda (c)
      (cond
-      ((twittering-url-reserved-p c)
+      ((wassr-url-reserved-p c)
        (char-to-string c))
       ((eq c ? ) "+")
@@ -802,5 +794,5 @@
    ""))
 
-(defun twittering-url-reserved-p (ch)
+(defun wassr-url-reserved-p (ch)
   (or (and (<= ?A ch) (<= ch ?z))
       (and (<= ?0 ch) (<= ch ?9))
@@ -810,5 +802,5 @@
       (eq ?~ ch)))
 
-(defun twittering-decode-html-entities (encoded-str)
+(defun wassr-decode-html-entities (encoded-str)
   (if encoded-str
       (let ((cursor 0)
@@ -825,5 +817,5 @@
 		   (list-push
 		    (char-to-string
-		     (twittering-ucs-to-char
+		     (wassr-ucs-to-char
 		      (string-to-number number-entity))) result))
 		  (letter-entity
@@ -837,20 +829,20 @@
     ""))
 
-(defun twittering-timer-action (func)
-  (let ((buf (get-buffer twittering-buffer)))
+(defun wassr-timer-action (func)
+  (let ((buf (get-buffer wassr-buffer)))
     (if (null buf)
-	(twittering-stop)
+	(wassr-stop)
       (funcall func)
       )))
 
-(defun twittering-update-status-if-not-blank (status)
+(defun wassr-update-status-if-not-blank (status)
   (if (string-match "^\\s-*\\(?:@[-_a-z0-9]+\\)?\\s-*$" status)
       nil
-    (twittering-http-post "statuses" "update"
+    (wassr-http-post "statuses" "update"
 			  `(("status" . ,status)
-			    ("source" . "twmode")))
+			    ("source" . "ws-mode")))
     t))
 
-(defun twittering-update-status-from-minibuffer (&optional init-str)
+(defun wassr-update-status-from-minibuffer (&optional init-str)
   (if (null init-str) (setq init-str ""))
   (let ((status init-str) (not-posted-p t))
@@ -858,17 +850,17 @@
       (setq status (read-from-minibuffer "status: " status nil nil nil nil t))
       (setq not-posted-p
-	    (not (twittering-update-status-if-not-blank status))))))
-
-(defun twittering-update-lambda ()
-  (interactive)
-  (twittering-http-post
+	    (not (wassr-update-status-if-not-blank status))))))
+
+(defun wassr-update-lambda ()
+  (interactive)
+  (wassr-http-post
    "statuses" "update"
    `(("status" . "\xd34b\xd22b\xd26f\xd224\xd224\xd268\xd34b")
-     ("source" . "twmode"))))
-
-(defun twittering-update-jojo (usr msg)
+     ("source" . "ws-mode"))))
+
+(defun wassr-update-jojo (usr msg)
   (if (string-match "\xde21\xd24b\\(\xd22a\xe0b0\\|\xdaae\xe6cd\\)\xd24f\xd0d6\\([^\xd0d7]+\\)\xd0d7\xd248\xdc40\xd226"
 		    msg)
-      (twittering-http-post
+      (wassr-http-post
        "statuses" "update"
        `(("status" . ,(concat
@@ -876,5 +868,5 @@
 		       (match-string-no-properties 2 msg)
 		       "\xd0a1\xd24f\xd243!?"))
-	 ("source" . "twmode")))))
+	 ("source" . "ws-mode")))))
 
 ;;;
@@ -882,40 +874,40 @@
 ;;;
 
-(defun twittering-start (&optional action)
+(defun wassr-start (&optional action)
   (interactive)
   (if (null action)
-      (setq action #'twittering-friends-timeline))
-  (if twittering-timer
+      (setq action #'wassr-friends-timeline))
+  (if wassr-timer
       nil
-    (setq twittering-timer
+    (setq wassr-timer
 	  (run-at-time "0 sec"
-		       twittering-timer-interval
-		       #'twittering-timer-action action))))
-
-(defun twittering-stop ()
-  (interactive)
-  (cancel-timer twittering-timer)
-  (setq twittering-timer nil))
-
-(defun twittering-friends-timeline ()
-  (interactive)
-  (let ((buf (get-buffer twittering-buffer)))
+		       wassr-timer-interval
+		       #'wassr-timer-action action))))
+
+(defun wassr-stop ()
+  (interactive)
+  (cancel-timer wassr-timer)
+  (setq wassr-timer nil))
+
+(defun wassr-friends-timeline ()
+  (interactive)
+  (let ((buf (get-buffer wassr-buffer)))
     (if (not buf)
-	(twittering-stop)
-      (twittering-http-get "statuses" "friends_timeline")
+	(wassr-stop)
+      (wassr-http-get "statuses" "friends_timeline")
       ))
 
-  (if twittering-icon-mode
-      (if twittering-image-stack
+  (if wassr-icon-mode
+      (if wassr-image-stack
 	  (let ((proc
 		 (apply
 		  #'start-process
 		  "wget-images"
-		  (twittering-wget-buffer)
+		  (wassr-wget-buffer)
 		  "wget"
-		  (format "--directory-prefix=%s" twittering-tmp-dir)
+		  (format "--directory-prefix=%s" wassr-tmp-dir)
 		  "--no-clobber"
 		  "--quiet"
-		  twittering-image-stack)))
+		  wassr-image-stack)))
 	    (set-process-sentinel
 	     proc
@@ -923,17 +915,17 @@
 	       (clear-image-cache)
 	       (save-excursion
-		 (set-buffer (twittering-wget-buffer))
+		 (set-buffer (wassr-wget-buffer))
 		 )))))))
 
-(defun twittering-update-status-interactive ()
-  (interactive)
-  (twittering-update-status-from-minibuffer))
-
-(defun twittering-erase-old-statuses ()
-  (interactive)
-  (setq twittering-friends-timeline-data nil)
-  (twittering-http-get "statuses" "friends_timeline"))
-
-(defun twittering-click ()
+(defun wassr-update-status-interactive ()
+  (interactive)
+  (wassr-update-status-from-minibuffer))
+
+(defun wassr-erase-old-statuses ()
+  (interactive)
+  (setq wassr-friends-timeline-data nil)
+  (wassr-http-get "statuses" "friends_timeline"))
+
+(defun wassr-click ()
   (interactive)
   (let ((uri (get-text-property (point) 'uri)))
@@ -941,14 +933,14 @@
 	(browse-url uri))))
 
-(defun twittering-enter ()
+(defun wassr-enter ()
   (interactive)
   (let ((username (get-text-property (point) 'username))
 	(uri (get-text-property (point) 'uri)))
     (if username
-	(twittering-update-status-from-minibuffer (concat "@" username " "))
+	(wassr-update-status-from-minibuffer (concat "@" username " "))
       (if uri
 	  (browse-url uri)))))
 
-(defun twittering-view-user-page ()
+(defun wassr-view-user-page ()
   (interactive)
   (let ((uri (get-text-property (point) 'uri)))
@@ -956,28 +948,28 @@
 	(browse-url uri))))
 
-(defun twittering-reply-to-user ()
+(defun wassr-reply-to-user ()
   (interactive)
   (let ((username (get-text-property (point) 'username)))
     (if username
-	(twittering-update-status-from-minibuffer (concat "@" username " ")))))
-
-(defun twittering-get-password ()
-  (or twittering-password
-      (setq twittering-password (read-passwd "twittering-mode: "))))
-
-(defun twittering-goto-next-status ()
+	(wassr-update-status-from-minibuffer (concat "@" username " ")))))
+
+(defun wassr-get-password ()
+  (or wassr-password
+      (setq wassr-password (read-passwd "wassr-mode: "))))
+
+(defun wassr-goto-next-status ()
   "Go to next status."
   (interactive)
   (let ((pos))
-    (setq pos (twittering-get-next-username-face-pos (point)))
+    (setq pos (wassr-get-next-username-face-pos (point)))
     (if pos
 	(goto-char pos)
       (message "End of status."))))
 
-(defun twittering-get-next-username-face-pos (pos)
+(defun wassr-get-next-username-face-pos (pos)
   (interactive)
   (let ((prop))
     (catch 'not-found
-      (while (and pos (not (eq prop twittering-username-face)))
+      (while (and pos (not (eq prop wassr-username-face)))
 	(setq pos (next-single-property-change pos 'face))
 	(when (eq pos nil) (throw 'not-found nil))
@@ -985,18 +977,18 @@
       pos)))
 
-(defun twittering-goto-previous-status ()
+(defun wassr-goto-previous-status ()
   "Go to previous status."
   (interactive)
   (let ((pos))
-    (setq pos (twittering-get-previous-username-face-pos (point)))
+    (setq pos (wassr-get-previous-username-face-pos (point)))
     (if pos
 	(goto-char pos)
       (message "Start of status."))))
 
-(defun twittering-get-previous-username-face-pos (pos)
+(defun wassr-get-previous-username-face-pos (pos)
   (interactive)
   (let ((prop))
     (catch 'not-found
-      (while (and pos (not (eq prop twittering-username-face)))
+      (while (and pos (not (eq prop wassr-username-face)))
 	(setq pos (previous-single-property-change pos 'face))
 	(when (eq pos nil) (throw 'not-found nil))
@@ -1004,12 +996,12 @@
       pos)))
 
-(defun twittering-goto-next-status-of-user ()
+(defun wassr-goto-next-status-of-user ()
   "Go to next status of user."
   (interactive)
-  (let ((user-name (twittering-get-username-at-pos (point)))
-	(pos (twittering-get-next-username-face-pos (point))))
+  (let ((user-name (wassr-get-username-at-pos (point)))
+	(pos (wassr-get-next-username-face-pos (point))))
     (while (and (not (eq pos nil))
-		(not (equal (twittering-get-username-at-pos pos) user-name)))
-      (setq pos (twittering-get-next-username-face-pos pos)))
+		(not (equal (wassr-get-username-at-pos pos) user-name)))
+      (setq pos (wassr-get-next-username-face-pos pos)))
     (if pos
 	(goto-char pos)
@@ -1018,12 +1010,12 @@
 	(message "Invalid user-name.")))))
 
-(defun twittering-goto-previous-status-of-user ()
+(defun wassr-goto-previous-status-of-user ()
   "Go to previous status of user."
   (interactive)
-  (let ((user-name (twittering-get-username-at-pos (point)))
-	(pos (twittering-get-previous-username-face-pos (point))))
+  (let ((user-name (wassr-get-username-at-pos (point)))
+	(pos (wassr-get-previous-username-face-pos (point))))
     (while (and (not (eq pos nil))
-		(not (equal (twittering-get-username-at-pos pos) user-name)))
-      (setq pos (twittering-get-previous-username-face-pos pos)))
+		(not (equal (wassr-get-username-at-pos pos) user-name)))
+      (setq pos (wassr-get-previous-username-face-pos pos)))
     (if pos
 	(goto-char pos)
@@ -1032,9 +1024,9 @@
 	(message "Invalid user-name.")))))
 
-(defun twittering-get-username-at-pos (pos)
+(defun wassr-get-username-at-pos (pos)
   (let ((start-pos pos)
 	(end-pos))
     (catch 'not-found
-      (while (eq (get-text-property start-pos 'face) twittering-username-face)
+      (while (eq (get-text-property start-pos 'face) wassr-username-face)
 	(setq start-pos (1- start-pos))
 	(when (or (eq start-pos nil) (eq start-pos 0)) (throw 'not-found nil)))
@@ -1043,14 +1035,14 @@
       (buffer-substring start-pos end-pos))))
 
-(defun twittering-get-status-url (username id)
+(defun wassr-get-status-url (username id)
   "Generate status URL."
-  (format "http://twitter.com/%s/statuses/%d" username id))
+  (format "http://api.wassr.jp/%s/statuses/%d" username id))
 
 ;;;###autoload
-(defun twit ()
-  "Start twittering-mode."
-  (interactive)
-  (twittering-mode))
-
-(provide 'twittering-mode)
-;;; twittering.el ends here
+(defun wassr ()
+  "Start wassr-mode."
+  (interactive)
+  (wassr-mode))
+
+(provide 'wassr-mode)
+;;; wassr.el ends here
