Sha256: 6c2f10b6b98da397bd1704373edda62aa10b5b3cb4c7302cec290b27fff023d8

Contents?: true

Size: 637 Bytes

Versions: 19

Compression:

Stored size: 637 Bytes

Contents

# encoding: UTF-8

# require 'twitter'

require_relative 'base_middleware'

module GoodData
  module Bricks
    class TwitterMiddleware < Bricks::Middleware
      def call(params)
        client = Twitter::REST::Client.new do |config|
          config.consumer_key = params[:twitter_consumer_key]
          config.consumer_secret = params[:twitter_consumer_secret]
          config.access_token = params[:twitter_access_token]
          config.access_token_secret = params[:twitter_access_token_secret]
        end

        returning(@app.call(params)) do |result|
          client.update(result)
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gooddata-0.6.20 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.19 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.18 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.17 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.16 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.15 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.14 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.13 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.12 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.11 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.10 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.9 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.8 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.7 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.6 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.5 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.4 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.3 lib/gooddata/bricks/middleware/twitter_middleware.rb
gooddata-0.6.2 lib/gooddata/bricks/middleware/twitter_middleware.rb