Permalink
Browse files

Initial retweet support.

Closes: #583999.
  • Loading branch information...
1 parent 23f6fa4 commit d2b4f5685ca419900c3b54a8a8b1e06ae2cf8091 @jgoerzen committed Jun 1, 2010
Showing with 47 additions and 1 deletion.
  1. +3 −0 Commands.hs
  2. +44 −1 Commands/Ls.hs
View
@@ -54,6 +54,9 @@ allCommands =
Commands.Ls.lsfollowing,
Commands.Ls.lsrecent,
Commands.Ls.lsreplies,
+ Commands.Ls.lsrt,
+ Commands.Ls.lsrtarchive,
+ Commands.Ls.lsrtreplies,
Commands.Setup.setup,
Commands.FollowBlock.unblock,
Commands.FollowBlock.unfollow,
View
@@ -17,7 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
module Commands.Ls(lsrecent, lsreplies, lsblocking,
- lsfollowing, lsfollowers, lsarchive, lsdm, lsdmarchive) where
+ lsfollowing, lsfollowers, lsarchive,
+ lsrt, lsrtreplies, lsrtarchive, lsdm, lsdmarchive) where
import Utils
import System.Log.Logger
import Types
@@ -125,6 +126,8 @@ lsarchive = simpleCmd "lsarchive" "List recent status updates you posted yoursel
(stdopts ++ sinceopts) (paginated (statuses_worker "lsarchive"
"/statuses/user_timeline"))
+
+
lsdm = simpleCmd "lsdm" "List recent direct messages to you"
lsdm_help
(stdopts ++ sinceopts) (paginated (dm_worker "lsdm"
@@ -135,6 +138,21 @@ lsdmarchive = simpleCmd "lsdmarchive" "List recent direct messages you sent"
(stdopts ++ sinceopts) (paginated (dm_worker "lsdmarchive"
"/direct_messages/sent"))
+lsrt = simpleCmd "lsrt" "List recent retweets from those you follow"
+ lsrt_help
+ (stdopts ++ sinceopts) (paginated (statuses_worker "lsrt"
+ "/statuses/retweeted_to_me"))
+
+lsrtarchive = simpleCmd "lsrtarchive" "List recent retweets you made yourself"
+ lsrtarchive_help
+ (stdopts ++ sinceopts) (paginated (statuses_worker "lsrtarchive"
+ "/statuses/retweeted_by_me"))
+
+lsrtreplies = simpleCmd "lsrtreplies" "List others' retweets of your statuses"
+ lsrtreplies_help
+ (stdopts ++ sinceopts) (paginated (statuses_worker "lsrtreplies"
+ "/statuses/retweets_of_me"))
+
statuses_worker = generic_worker handleStatus
dm_worker = generic_worker handleDM
@@ -175,6 +193,31 @@ lsarchive_help =
\refer to the examples under twidge lsrecent --help, which also pertain\n\
\to lsarchive.\n"
+lsrt_help =
+ "Usage: twidge lsrt [options]\n\n\
+ \You can see the 20 most recent retweets posted by those you follow with:\n\n\
+ \ twidge lsrt\n\n\
+ \For more examples, including how to see only unseen retweets, please\n\
+ \refer to the examples under twidge lsrecent --help, which also pertain\n\
+ \to lsreplies.\n"
+
+lsrtreplies_help =
+ "Usage: twidge lsrtreplies [options]\n\n\
+ \You can see the 20 most retweets made of your statuses with:\n\n\
+ \ twidge lsrtreplies\n\n\
+ \For more examples, including how to see only unseen retweets, please\n\
+ \refer to the examples under twidge lsrecent --help, which also pertain\n\
+ \to lsreplies.\n"
+
+lsrtarchive_help =
+ "Usage: twidge lsrt [options]\n\n\
+ \You can see the 20 most recent retweets you made:\n\n\
+ \ twidge lsrtarchive\n\n\
+ \For more examples, including how to see only unseen retweets, please\n\
+ \refer to the examples under twidge lsrecent --help, which also pertain\n\
+ \to lsreplies.\n"
+
+
lsdm_help =
"Usage: twidge lsdm [options]\n\n\
\You can see the 20 most recent direct messages to you with:\n\n\

0 comments on commit d2b4f56

Please sign in to comment.