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



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

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

.passwordObject



15
16
17
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 15

def self.password
  "api_token"
end

.start(params) ⇒ Object



24
25
26
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 24

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

.userObject



11
12
13
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 11

def self.user
  RenuoCliConfig.toggl_api_token
end

Instance Method Details

#stopObject



28
29
30
# File 'lib/renuo/cli/app/toggl/time_entry.rb', line 28

def stop
  put(:stop)
end