Changeset 59 for lang/elisp/wassr-mode/trunk
- Timestamp:
- 07/26/08 14:05:30 (16 years ago)
- Location:
- lang/elisp/wassr-mode/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/elisp/wassr-mode/trunk/ChangeLog
r57 r59 1 2008-07-26 Tsuyoshi CHO <Tsuyoshi.CHO+develop@Gmail.com> 2 3 * wassr-mode.el: ステータスのアップデートできるようになった 4 (wassr-http-get, wassr-http-post): typeを追加 5 (wassr-update-status-if-not-blank, wassr-update-lambda) 6 (wassr-update-jojo, wassr-friends-timeline) 7 (wassr-erase-old-statuses): 上記typeに対応 8 1 9 2008-07-21 Tsuyoshi CHO <Tsuyoshi.CHO+develop@Gmail.com> 2 10 -
lang/elisp/wassr-mode/trunk/wassr-mode.el
r57 r59 315 315 ;;; 316 316 317 (defun wassr-http-get (method-class method &optional sentinel)317 (defun wassr-http-get (method-class method type &optional sentinel) 318 318 (if (null sentinel) (setq sentinel 'wassr-http-get-default-sentinel)) 319 319 … … 345 345 request) 346 346 (setq request 347 (concat "GET http://" wassr-api-server "/" method-class "/" method ".xml HTTP/1.1" nl 347 (concat "GET http://" wassr-api-server "/" method-class "/" 348 method "." type " HTTP/1.1" nl 348 349 "Host: " wassr-api-server nl 349 350 "User-Agent: " (wassr-user-agent) nl … … 497 498 (let ((formatted-status (apply 'concat (nreverse result)))) 498 499 (add-text-properties 0 (length formatted-status) 499 `(username ,(attr 'user- screen-name))500 `(username ,(attr 'user-login-id)) 500 501 formatted-status) 501 502 formatted-status) … … 503 504 504 505 (defun wassr-http-post 505 (method-class method &optional parameters contents sentinel)506 (method-class method type &optional parameters contents sentinel) 506 507 "Send HTTP POST request to `wassr-api-server' 507 508 … … 537 538 request) 538 539 (setq request 539 (concat "POST http://" wassr-api-server "/" method-class "/" method ".xml?" 540 (concat "POST http://" wassr-api-server "/" method-class "/" 541 method "." type "?" 540 542 (if parameters 541 543 (mapconcat … … 683 685 0 (length user-login-id) 684 686 `(mouse-face highlight 685 uri ,(concat "http://wassr.jp/user/" user- screen-name)687 uri ,(concat "http://wassr.jp/user/" user-login-id) 686 688 face wassr-username-face) 687 689 user-login-id) … … 692 694 `(mouse-face highlight 693 695 face wassr-username-face 694 uri ,(concat "http://wassr.jp/user/" user- screen-name)696 uri ,(concat "http://wassr.jp/user/" user-login-id) 695 697 face wassr-username-face) 696 698 user-screen-name) … … 809 811 (if (string-match "^\\s-*\\(?:@[-_a-z0-9]+\\)?\\s-*$" status) 810 812 nil 811 (wassr-http-post "statuses" "update" 813 (wassr-http-post "statuses" "update" "json" 812 814 `(("status" . ,status) 813 815 ("source" . "ws-mode"))) … … 825 827 (interactive) 826 828 (wassr-http-post 827 "statuses" "update" 829 "statuses" "update" "json" 828 830 `(("status" . "\xd34b\xd22b\xd26f\xd224\xd224\xd268\xd34b") 829 831 ("source" . "ws-mode")))) … … 833 835 msg) 834 836 (wassr-http-post 835 "statuses" "update" 837 "statuses" "update" "json" 836 838 `(("status" . ,(concat 837 839 "@" usr " " … … 865 867 (if (not buf) 866 868 (wassr-stop) 867 (wassr-http-get "statuses" "friends_timeline" )869 (wassr-http-get "statuses" "friends_timeline" "xml") 868 870 )) 869 871 … … 895 897 (interactive) 896 898 (setq wassr-friends-timeline-data nil) 897 (wassr-http-get "statuses" "friends_timeline" ))899 (wassr-http-get "statuses" "friends_timeline" "xml")) 898 900 899 901 (defun wassr-click ()