Changeset 85544a9


Ignore:
Timestamp:
05/06/2009 01:42:00 PM (16 years ago)
Author:
njw <njw@…>
Branches:
master
Children:
454b95c
Parents:
9ea979a
Message:

minor fix to since-query-awkward

File:
1 edited

Legend:

Unmodified
Added
Removed
  • de.wigbels.ruby/rmallyourtweets/rmallyourtweets.rb

    r9ea979a r85544a9  
    1414
    1515# auth yourself
    16 httpauth = Twitter::HTTPAuth.new('YOUR_USER', 'YOUR_PASSWORD')
     16httpauth = Twitter::HTTPAuth.new('YOUR_USERNAME', 'PASSWORD')
    1717twitter = Twitter::Base.new(httpauth)
    1818
    1919# go for complete deletion
    20 twitter.user_timeline("since:2004-01-14").each do |s|
    21   twitter.status_destroy(s.id)
    22   puts "Deleted tweet: [#{s.id}] \"#{s.text}\" (#{s.created_at})"
     20chunk = twitter.user_timeline
     21while chunk do
     22  chunk.each do |s|
     23    twitter.status_destroy(s.id)
     24    puts "Deleted tweet: [#{s.id}] \"#{s.text}\" (#{s.created_at})"
     25  end
     26  chunk = twitter.user_timeline
    2327end
    2428
    2529# finally
    26 twitter.update("Hey! Ho! Let's Go #rmallyourtweets
    27 http://foobla.wigbels.de/tag/delete-all-tweets/")
     30twitter.update("Hey! Ho! Let's Go #rmallyourtweets http://foobla.wigbels.de/tag/delete-all-tweets/")
Note: See TracChangeset for help on using the changeset viewer.