Sha256: 185d97c02bd879517d6580c7434527bf71e2147c3ff02070f2d82d336994ac92

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

module Webstalker
  class Twitter < Webstalker::Base
    def tags
      url = "http://api.twitter.com/1/favorites/#{username}.json"

      doc = JSON.parse(open(url).read)

      r = Set.new
      doc.each do |t|
        t["text"].split(/\s+/).each do |w|
          if w=~/^#(.+)/
            r << $1
          end
        end
      end

      r
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webstalker-0.1.0 lib/webstalker/twitter.rb