Class: TwitterLabsAPI::Client

Inherits:
Object
  • Object
show all
Includes:
Resources::Tweet, Resources::User
Defined in:
lib/twitter_labs_api/client.rb

Constant Summary

Constants included from Resources::User

Resources::User::DEFAULT_FIELDS, Resources::User::DEFAULT_USER_FIELDS

Constants included from Resources::Tweet

Resources::Tweet::DEFAULT_FIELDS, Resources::Tweet::DEFAULT_TWEET_FIELDS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Resources::User

#get_user, #get_users, #get_users_by_usernames

Methods included from Resources::Tweet

#get_tweet, #get_tweets, #hide_reply, #search

Constructor Details

#initialize(bearer_token:, debug: false) ⇒ Client

Returns a new instance of Client.



14
15
16
17
18
# File 'lib/twitter_labs_api/client.rb', line 14

def initialize(bearer_token:, debug: false)
  @bearer_token = bearer_token
  @debug = debug
  require 'httplog' if debug
end

Instance Attribute Details

#api_responseObject

Returns the value of attribute api_response.



12
13
14
# File 'lib/twitter_labs_api/client.rb', line 12

def api_response
  @api_response
end

#bearer_tokenObject

Returns the value of attribute bearer_token.



12
13
14
# File 'lib/twitter_labs_api/client.rb', line 12

def bearer_token
  @bearer_token
end

#debugObject

Returns the value of attribute debug.



12
13
14
# File 'lib/twitter_labs_api/client.rb', line 12

def debug
  @debug
end

#parsed_responseObject

Returns the value of attribute parsed_response.



12
13
14
# File 'lib/twitter_labs_api/client.rb', line 12

def parsed_response
  @parsed_response
end