Class: Insightly::Task
Instance Method Summary
collapse
#add_task_link, #task_links, #task_links=
Methods inherited from ReadWrite
#post_collection, #put_collection, #save, #to_json, #update_data
Methods inherited from Base
#==, all, api_field, build, #build, #config, custom_fields, #get_collection, #initialize, #load, #process, #reload, #remote_data, #to_json, #url_base
Instance Method Details
37
38
39
40
41
|
# File 'lib/insightly/task.rb', line 37
def (body)
= Insightly::Comment.new.build({"BODY" => body})
result = post_collection("#{url_base}/#{task_id}/comments", .remote_data.to_json)
.build(result)
end
|
29
30
31
32
33
34
35
|
# File 'lib/insightly/task.rb', line 29
def
list = []
get_collection("#{url_base}/#{task_id}/comments").each do |d|
list << Insightly::Comment.build(d)
end
list
end
|
#completed? ⇒ Boolean
55
56
57
|
# File 'lib/insightly/task.rb', line 55
def completed?
status == "COMPLETED"
end
|
#deferred? ⇒ Boolean
59
60
61
|
# File 'lib/insightly/task.rb', line 59
def deferred?
status == "DEFERRED"
end
|
#fix_for_link(link) ⇒ Object
68
69
70
71
72
|
# File 'lib/insightly/task.rb', line 68
def fix_for_link(link)
link.task_id = self.remote_id
link
end
|
#in_progress? ⇒ Boolean
47
48
49
|
# File 'lib/insightly/task.rb', line 47
def in_progress?
status == "IN PROGRESS"
end
|
#not_started? ⇒ Boolean
43
44
45
|
# File 'lib/insightly/task.rb', line 43
def not_started?
status == "NOT STARTED"
end
|
#remote_id ⇒ Object
64
65
66
|
# File 'lib/insightly/task.rb', line 64
def remote_id
task_id
end
|
#waiting? ⇒ Boolean
51
52
53
|
# File 'lib/insightly/task.rb', line 51
def waiting?
status == "WAITING"
end
|