Class: Everhour2toggl::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/everhour2toggl/cli.rb

Instance Method Summary collapse

Instance Method Details

#convertObject



26
27
28
29
# File 'lib/everhour2toggl/cli.rb', line 26

def convert
  toggl = Toggl.new(input: options[:input], starting_time: options[:starting_time], interval: options[:interval], wid: options[:wid], pid: options[:pid], tags: options[:tags])
  toggl.convert
end

#exportObject



14
15
16
17
# File 'lib/everhour2toggl/cli.rb', line 14

def export
  everhour = Everhour.new(from: options[:from], to: options[:to], fields: options[:fields], apikey: options[:apikey])
  everhour.export
end

#postObject



34
35
36
37
# File 'lib/everhour2toggl/cli.rb', line 34

def post
  toggl_post = Toggl::Post.new(api_token: options[:api_token], input: options[:input])
  toggl_post.post
end