Class: Producteev::Client
- Inherits:
-
Object
- Object
- Producteev::Client
- Defined in:
- lib/producteev/client.rb
Instance Method Summary collapse
- #activities ⇒ Object
- #dashboards ⇒ Object
-
#initialize(email, password) ⇒ Client
constructor
A new instance of Client.
- #labels ⇒ Object
- #tasks ⇒ Object
- #time ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(email, password) ⇒ Client
Returns a new instance of Client.
4 5 6 7 |
# File 'lib/producteev/client.rb', line 4 def initialize(email,password) param = {:email => email, :password => password} @token = Producteev::Api.instance.send_request("/users/login.json",param)['login']['token'] end |
Instance Method Details
#activities ⇒ Object
21 22 23 |
# File 'lib/producteev/client.rb', line 21 def activities() return Producteev::Activities.new(@token) end |
#dashboards ⇒ Object
25 26 27 |
# File 'lib/producteev/client.rb', line 25 def dashboards() return Producteev::Dashboards.new(@token) end |
#labels ⇒ Object
13 14 15 |
# File 'lib/producteev/client.rb', line 13 def labels() return Producteev::Labels.new(@token) end |
#tasks ⇒ Object
9 10 11 |
# File 'lib/producteev/client.rb', line 9 def tasks() return Producteev::Tasks.new(@token) end |
#time ⇒ Object
17 18 19 |
# File 'lib/producteev/client.rb', line 17 def time() return Producteev::Api.instance.send_request("/time.json",{},@token) end |
#users ⇒ Object
29 30 31 |
# File 'lib/producteev/client.rb', line 29 def users() return Producteev::Users.new(@token) end |