Class: HabiticaClient::ApiBase

Inherits:
Object
  • Object
show all
Defined in:
lib/habitica_client/api_base.rb

Overview

The basis of all HabiticaClient endpoint objects.

All HabiticaClient endpoint objects need a reference to the http client so that we can make the API work using the dot syntax.

Direct Known Subclasses

Restful, User, User::Stats, User::Tasks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ApiBase

Returns a new instance of ApiBase.



11
12
13
# File 'lib/habitica_client/api_base.rb', line 11

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



9
10
11
# File 'lib/habitica_client/api_base.rb', line 9

def client
  @client
end