Skip to content

Instantly share code, notes, and snippets.

Created November 2, 2014 16:03
What would you like to do?
#!/usr/bin/env ruby -wU
# This script uses the command line twitter client
# 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"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment