Sha256: 59a1c89d0813d23509511eaaa094ba10f589f8442ac268adb85403b8cf52d2ff

Contents?: true

Size: 577 Bytes

Versions: 26

Compression:

Stored size: 577 Bytes

Contents

module Binders
  class Tweets < Bowline::Binders::Collection
    class << self
      def index
        self.items = timeline
      end
      
      def update(status)
        twitter.update(status)
        index # update timeline
      end
      
      protected
        def twitter
          httpauth = Twitter::HTTPAuth.new('user', 'pass')
          Twitter::Base.new(httpauth)
        end
        
        def timeline
          twitter.friends_timeline.collect {|t|
            t.delete('user')
            t.to_hash
          }
        end
    end
    
  end
end # Binders

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
bowline-0.5.2 examples/tweets.rb
bowline-0.5.1 examples/tweets.rb
bowline-0.5.0 examples/tweets.rb
bowline-0.4.6 examples/tweets.rb
bowline-0.3.9 examples/tweets.rb
bowline-0.1.6 examples/tweets.rb