Class: Gratitude::Client
- Inherits:
-
Object
- Object
- Gratitude::Client
- Includes:
- Tips, Connection
- Defined in:
- lib/gratitude/tips.rb,
lib/gratitude/client.rb
Defined Under Namespace
Modules: Tips
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Tips
#current_tips, #current_tips_total, #update_tips, #update_tips_and_prune
Methods included from Connection
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 |
# File 'lib/gratitude/client.rb', line 13 def initialize( = {}) @username = [:username] @api_key = [:api_key] faraday.basic_auth(api_key, "") end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/gratitude/client.rb', line 11 def api_key @api_key end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
11 12 13 |
# File 'lib/gratitude/client.rb', line 11 def username @username end |