Created
August 6, 2014 08:52
-
-
Save toshia/ee2c358b70ee7f690e82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plugin.create(:mikutter_profile_media) do | |
profiletab :usermediatimeline, _("最近の画像つきツイート") do | |
set_icon Skin.get("aclog.png") | |
uid = user.id | |
i_timeline = timeline nil do | |
order do |message| | |
retweet = message.retweeted_statuses.find{ |r| uid == r.user.id } | |
(retweet || message)[:created].to_i end end | |
Service.primary.search(q: "from:#{user[:idname]} filter:images", | |
count: [UserConfig[:profile_show_tweet_once], 200].min, | |
include_entities: true).next{ |tl| | |
tl.each do |message| | |
if message[:entities][:media] | |
i_timeline << message | |
end | |
end | |
}.terminate(_("@%{user} の最近のつぶやきが取得できませんでした。見るなってことですかね") % {user: user[:idname]}) | |
timeline_storage[i_timeline.slug] = user end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment