Module: TwitterTweetBot::API::HTTP::Headers
- Included in:
- TwitterTweetBot::API::HTTP
- Defined in:
- lib/twitter_tweet_bot/api/http/headers.rb
Constant Summary collapse
- BASIC_AUTHORIZATION =
'Basic %<credentials>s'.freeze
- BEARER_AUTHORIZATION =
'Bearer %<credentials>s'.freeze
Instance Method Summary collapse
- #basic_authorization_header(user, password) ⇒ Object
- #bearer_authorization_header(credentials) ⇒ Object
Instance Method Details
#basic_authorization_header(user, password) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/twitter_tweet_bot/api/http/headers.rb', line 12 def (user, password) { authorization: format( BASIC_AUTHORIZATION, credentials: (user, password) ) } end |
#bearer_authorization_header(credentials) ⇒ Object
21 22 23 |
# File 'lib/twitter_tweet_bot/api/http/headers.rb', line 21 def (credentials) { authorization: format(BEARER_AUTHORIZATION, credentials: credentials) } end |