Skip to content

Instantly share code, notes, and snippets.

@jeena
Created August 30, 2015 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeena/18db8076b9ed928f1f04 to your computer and use it in GitHub Desktop.
Save jeena/18db8076b9ed928f1f04 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby -wU
#
# This script uses the command line twitter client https://github.com/twitter/twurl
# You have to authorize Twurl one time before you can use ist, please read the
# README for Twurl which describes how to do it.
# What it basically does is it sets the flag that you don't want to see
# any retweets of any users at all.
require 'json'
friends = JSON.parse(`twurl "/1.1/friends/ids.json"`)["ids"]
no_retweets = JSON.parse(`twurl "/1.1/friendships/no_retweets/ids.json"`)
(friends - no_retweets).each do |id|
puts `twurl -X POST "/1.1/friendships/update.json" -d "user_id=#{id}&retweets=false"`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment