Class: LabClient::EpicNotes
- Includes:
- ClassHelpers
- Defined in:
- lib/labclient/notes/epics/list.rb,
lib/labclient/notes/epics/show.rb,
lib/labclient/notes/epics/client.rb,
lib/labclient/notes/epics/create.rb,
lib/labclient/notes/epics/delete.rb,
lib/labclient/notes/epics/update.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
- #create(group_id, epic_id, query = {}) ⇒ Object
-
#delete(group_id, epic_id, note_id) ⇒ Object
Delete.
- #list(group_id, epic_id, query = {}) ⇒ Object
- #show(group_id, epic_id, note_id) ⇒ Object
-
#update(group_id, epic_id, note_id, body) ⇒ Object
Show.
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
#create(group_id, epic_id, query = {}) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/labclient/notes/epics/create.rb', line 31 def create(group_id, epic_id, query = {}) group_id = format_id(group_id) epic_id = format_id(epic_id) query[:created_at] = query[:created_at].to_time.iso8601 if format_time?(query[:created_at]) client.request(:post, "groups/#{group_id}/epics/#{epic_id}/notes", Note, query) end |
#delete(group_id, epic_id, note_id) ⇒ Object
Delete
12 13 14 15 16 17 18 |
# File 'lib/labclient/notes/epics/delete.rb', line 12 def delete(group_id, epic_id, note_id) group_id = format_id(group_id) epic_id = format_id(epic_id) note_id = format_id(note_id) client.request(:delete, "groups/#{group_id}/epics/#{epic_id}/notes/#{note_id}") end |
#list(group_id, epic_id, query = {}) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/labclient/notes/epics/list.rb', line 32 def list(group_id, epic_id, query = {}) group_id = format_id(group_id) epic_id = format_id(epic_id) client.request(:get, "groups/#{group_id}/epics/#{epic_id}/notes", Note, query) end |
#show(group_id, epic_id, note_id) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/labclient/notes/epics/show.rb', line 14 def show(group_id, epic_id, note_id) group_id = format_id(group_id) epic_id = format_id(epic_id) note_id = format_id(note_id) client.request(:get, "groups/#{group_id}/epics/#{epic_id}/notes/#{note_id}", Note) end |
#update(group_id, epic_id, note_id, body) ⇒ Object
Show
23 24 25 26 27 28 29 30 |
# File 'lib/labclient/notes/epics/update.rb', line 23 def update(group_id, epic_id, note_id, body) group_id = format_id(group_id) epic_id = format_id(epic_id) note_id = format_id(note_id) query = { body: body } client.request(:put, "groups/#{group_id}/epics/#{epic_id}/notes/#{note_id}", Note, query) end |