Class: Toggl::TimeEntry

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/renuo/cli/app/toggl/time_entry.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.currentObject



17
18
19
20
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 17

def self.current
  data = get(:current)['data']
  data ? new(data) : nil
end

.passwordObject



13
14
15
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 13

def self.password
  'api_token'
end

.start(params) ⇒ Object



22
23
24
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 22

def self.start(params)
  post(:start, {}, params.to_json)
end

.userObject



9
10
11
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 9

def self.user
  RenuoCliConfig.toggl_api_token
end

Instance Method Details

#stopObject



26
27
28
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 26

def stop
  put(:stop)
end