Class: LabClient::GroupMilestones
- Includes:
- ClassHelpers
- Defined in:
- lib/labclient/groups/milestones/list.rb,
lib/labclient/groups/milestones/show.rb,
lib/labclient/groups/milestones/client.rb,
lib/labclient/groups/milestones/create.rb,
lib/labclient/groups/milestones/delete.rb,
lib/labclient/groups/milestones/issues.rb,
lib/labclient/groups/milestones/update.rb,
lib/labclient/groups/milestones/burndown.rb,
lib/labclient/groups/milestones/merge_requests.rb
Overview
Specifics
Constant Summary
Constants included from AccessLevel
AccessLevel::HUMAN_ACCESS_LEVELS, AccessLevel::MACHINE_ACCESS_LEVELS
Instance Attribute Summary
Attributes inherited from Common
Instance Method Summary collapse
-
#burndown(group_id, milestone_id) ⇒ Object
Show Specific.
- #create(group_id, query = {}) ⇒ Object
- #delete(group_id, milestone_id) ⇒ Object
- #issues(group_id, milestone_id) ⇒ Object
-
#list(group_id, query = {}) ⇒ Object
List.
- #merge_requests(group_id, milestone_id) ⇒ Object
-
#show(group_id, milestone_id) ⇒ Object
Show Specific.
- #update(group_id, milestone_id, query = {}) ⇒ Object
Methods included from ClassHelpers
Methods inherited from Common
#api_methods, #api_methods_help, #format_id, #format_query_id, #format_query_ids, #format_time?, #group_name, #help, #initialize, #inspect, #klass, #protected_query_access_level, #query_access_level, #query_format_time
Methods included from Docs
#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from AccessLevel
#human_access_level, #human_protected_access_level, #machine_access_level, #machine_protected_access_level
Constructor Details
This class inherits a constructor from LabClient::Common
Instance Method Details
#burndown(group_id, milestone_id) ⇒ Object
Show Specific
29 30 31 32 33 34 |
# File 'lib/labclient/groups/milestones/burndown.rb', line 29 def burndown(group_id, milestone_id) milestone_id = format_id(milestone_id) group_id = format_id(group_id) client.request(:get, "groups/#{group_id}/milestones/#{milestone_id}/burndown_events") end |
#create(group_id, query = {}) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/labclient/groups/milestones/create.rb', line 28 def create(group_id, query = {}) group_id = format_id(group_id) query[:due_date] = query[:due_date].to_time.iso8601 if format_time?(query[:due_date]) query[:start_date] = query[:start_date].to_time.iso8601 if format_time?(query[:start_date]) client.request(:post, "groups/#{group_id}/milestones", GroupMilestone, query) end |
#delete(group_id, milestone_id) ⇒ Object
20 21 22 23 24 |
# File 'lib/labclient/groups/milestones/delete.rb', line 20 def delete(group_id, milestone_id) milestone_id = format_id(milestone_id) group_id = format_id(group_id) client.request(:delete, "groups/#{group_id}/milestones/#{milestone_id}") end |
#issues(group_id, milestone_id) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/labclient/groups/milestones/issues.rb', line 22 def issues(group_id, milestone_id) milestone_id = format_id(milestone_id) group_id = format_id(group_id) client.request(:get, "groups/#{group_id}/milestones/#{milestone_id}/issues", Issue) end |
#list(group_id, query = {}) ⇒ Object
List
35 36 37 38 39 |
# File 'lib/labclient/groups/milestones/list.rb', line 35 def list(group_id, query = {}) group_id = format_id(group_id) client.request(:get, "groups/#{group_id}/milestones", GroupMilestone, query) end |
#merge_requests(group_id, milestone_id) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/labclient/groups/milestones/merge_requests.rb', line 22 def merge_requests(group_id, milestone_id) milestone_id = format_id(milestone_id) group_id = format_id(group_id) client.request(:get, "groups/#{group_id}/milestones/#{milestone_id}/merge_requests", MergeRequest) end |
#show(group_id, milestone_id) ⇒ Object
Show Specific
14 15 16 17 18 |
# File 'lib/labclient/groups/milestones/show.rb', line 14 def show(group_id, milestone_id) milestone_id = format_id(milestone_id) group_id = format_id(group_id) client.request(:get, "groups/#{group_id}/milestones/#{milestone_id}", GroupMilestone) end |
#update(group_id, milestone_id, query = {}) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/labclient/groups/milestones/update.rb', line 35 def update(group_id, milestone_id, query = {}) milestone_id = format_id(milestone_id) group_id = format_id(group_id) query[:due_date] = query[:due_date].to_time.iso8601 if format_time?(query[:due_date]) query[:start_date] = query[:start_date].to_time.iso8601 if format_time?(query[:start_date]) client.request(:put, "groups/#{group_id}/milestones/#{milestone_id}", GroupMilestone, query) end |