Class: TimestampAPI::Project

Inherits:
Model
  • Object
show all
Defined in:
lib/timestamp_api/models/project.rb

Instance Attribute Summary

Attributes inherited from Model

#json_data

Instance Method Summary collapse

Methods inherited from Model

inherited, #initialize

Methods included from ModelDefaultAPIMethods

included

Methods included from ModelRelations

included

Methods included from ModelAttributes

included

Methods included from Utils

#camelize, #camelize_keys

Constructor Details

This class inherits a constructor from TimestampAPI::Model

Instance Method Details

#enter_time(task_id, day, duration_in_minutes, comment = "") ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/timestamp_api/models/project.rb', line 10

def enter_time(task_id, day, duration_in_minutes, comment = "")
  TimestampAPI.request(:post, "#{@@api_path}/#{id}/enterTime", {}, {
    task_id:    task_id,
    day:        day.strftime("%FT%T%:z"),
    time_value: duration_in_minutes,
    time_unit:  "Minutes",
    comment:    comment
  }).object
end