Class: Producteev::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/producteev/client.rb

Instance Method Summary collapse

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

#activitiesObject



21
22
23
# File 'lib/producteev/client.rb', line 21

def activities()
  return Producteev::Activities.new(@token)
end

#dashboardsObject



25
26
27
# File 'lib/producteev/client.rb', line 25

def dashboards()
  return Producteev::Dashboards.new(@token)
end

#labelsObject



13
14
15
# File 'lib/producteev/client.rb', line 13

def labels()
  return Producteev::Labels.new(@token)
end

#tasksObject



9
10
11
# File 'lib/producteev/client.rb', line 9

def tasks()
  return Producteev::Tasks.new(@token)
end

#timeObject



17
18
19
# File 'lib/producteev/client.rb', line 17

def time()
  return Producteev::Api.instance.send_request("/time.json",{},@token)
end

#usersObject



29
30
31
# File 'lib/producteev/client.rb', line 29

def users()
  return Producteev::Users.new(@token)
end