Class: TwitterWrapper::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/twitter/wrapper/twitter_wrapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Client

Returns a new instance of Client.



5
6
7
8
9
10
11
12
# File 'lib/fastlane/plugin/twitter/wrapper/twitter_wrapper.rb', line 5

def initialize(params)
  @client = Twitter::REST::Client.new do |config|
    config.consumer_key        = params[:consumer_key]
    config.consumer_secret     = params[:consumer_secret]
    config.access_token        = params[:access_token]
    config.access_token_secret = params[:access_token_secret]
  end
end

Instance Method Details

#tweet(message) ⇒ Object



14
15
16
# File 'lib/fastlane/plugin/twitter/wrapper/twitter_wrapper.rb', line 14

def tweet(message)
  @client.update(message)
end