module Luxafor::Toggl

Constants

EXPECTED_ERRORS
VERSION

Attributes

idle_time[W]
luxafor_key[W]
state_file[W]
toggl_key[W]

Public Instance Methods

idle_time() click to toggle source
# File lib/luxafor/toggl.rb, line 51
def idle_time
  @idle_time ||= ENV.fetch('LUXAFOR_TOGGL_IDLE_TIME', 60 * 60 * 2).to_i # Default is 2 hours before you're idle
end
luxafor_client() click to toggle source
# File lib/luxafor/toggl.rb, line 59
def luxafor_client
  @luxafor_client ||= Luxafor::Client.new(luxafor_key)
end
luxafor_key() click to toggle source
# File lib/luxafor/toggl.rb, line 43
def luxafor_key
  @luxafor_key || ENV.fetch('LUXAFOR_KEY')
end
state_file() click to toggle source
# File lib/luxafor/toggl.rb, line 47
def state_file
  @state ||= ENV.fetch('LUXAFOR_TOGGL_STATE_FILE', "/tmp/#{Etc.getpwuid(Process.euid).name}-luxafor-toggl-state.json")
end
toggl_client() click to toggle source
# File lib/luxafor/toggl.rb, line 55
def toggl_client
  @toggl_client ||= TogglV8::API.new(toggl_key)
end
toggl_key() click to toggle source
# File lib/luxafor/toggl.rb, line 39
def toggl_key
  @toggl_key || ENV.fetch('TOGGL_KEY')
end