Module: TwitterTweetBot::Cache::ClientExt

Includes:
Caching
Included in:
TwitterTweetBot::Client
Defined in:
lib/twitter_tweet_bot/cache/client_ext.rb

Instance Method Summary collapse

Methods included from Caching

#cache, #with_cache

Instance Method Details

#authorizeObject



8
9
10
# File 'lib/twitter_tweet_bot/cache/client_ext.rb', line 8

def authorize(*)
  with_cache { super }
end

#fetch_token(*args) ⇒ Object



12
13
14
# File 'lib/twitter_tweet_bot/cache/client_ext.rb', line 12

def fetch_token(*args)
  with_cache { |cache| super(*args, cache[:code_verifier]) }
end

#post_tweet(*args) ⇒ Object



20
21
22
# File 'lib/twitter_tweet_bot/cache/client_ext.rb', line 20

def post_tweet(*args)
  with_cache { |cache| super(cache[:access_token], *args) }
end

#refresh_tokenObject



16
17
18
# File 'lib/twitter_tweet_bot/cache/client_ext.rb', line 16

def refresh_token
  with_cache { |cache| super(cache[:refresh_token]) }
end

#users_me(*args) ⇒ Object



24
25
26
# File 'lib/twitter_tweet_bot/cache/client_ext.rb', line 24

def users_me(*args)
  with_cache { |cache| super(cache[:access_token], *args) }
end