module Gitlab::Client::Epics

Defines methods related to Epics. @see docs.gitlab.com/ee/api/epics.html

Public Instance Methods

create_epic(group_id, title, options = {}) click to toggle source

Creates a new epic.

@example

Gitlab.create_epic(123, "My new epic title")

@param [Integer] group_id The ID of a group. @param [String] title @param [Hash] options A customizable set of options. @return [Gitlab::ObjectifiedHash] Information about created epic.

# File lib/gitlab/client/epics.rb, line 44
def create_epic(group_id, title, options = {})
  body = options.merge(title: title)
  post("/groups/#{group_id}/epics", body: body)
end
delete_epic(group_id, epic_iid) click to toggle source

Deletes an epic.

@example

Gitlab.delete_epic(42, 123)

@param [Integer] group_id The ID of a group. @param [Integer] epic_iid The IID of an epic.

# File lib/gitlab/client/epics.rb, line 55
def delete_epic(group_id, epic_iid)
  delete("/groups/#{group_id}/epics/#{epic_iid}")
end
edit_epic(group_id, epic_iid, options = {}) click to toggle source

Updates an existing epic.

@example

Gitlab.edit_epic(42)
Gitlab.edit_epic(42, 123, { title: 'New epic title' })

@param [Integer] group_id The ID. @param [Integer] epic_iid The IID of an epic. @param [Hash] options A customizable set of options @return [Gitlab::ObjectifiedHash] Information about the edited epic.

# File lib/gitlab/client/epics.rb, line 69
def edit_epic(group_id, epic_iid, options = {})
  put("/groups/#{group_id}/epics/#{epic_iid}", body: options)
end
epic(group_id, epic_iid, options = {}) click to toggle source

Gets a single epic.

@example

Gitlab.epic(123, 1)

@param [Integer] group_id The ID of a group. @param [Integer] epic_iid The ID of a epic. @param [Hash] options A customizable set of options. @return [Gitlab::ObjectifiedHash]

# File lib/gitlab/client/epics.rb, line 31
def epic(group_id, epic_iid, options = {})
  get("/groups/#{group_id}/epics/#{epic_iid}", query: options)
end
epics(group_id, options = {}) click to toggle source

Gets a list of epics.

@example

Gitlab.epics(123)
Gitlab.epics(123, { per_page: 40, page: 2 })

@param [Integer] group_id The ID of a group. @param [Hash] options A customizable set of options. @option options [Integer] :page The page number. @option options [Integer] :per_page The number of results per page. @return [Array<Gitlab::ObjectifiedHash>]

# File lib/gitlab/client/epics.rb, line 18
def epics(group_id, options = {})
  get("/groups/#{group_id}/epics", query: options)
end