Module: BacklogKit::Client::Group

Included in:
BacklogKit::Client
Defined in:
lib/backlog_kit/client/group.rb

Overview

Methods for the Group API

Instance Method Summary collapse

Instance Method Details

#create_group(name, params = {}) ⇒ BacklogKit::Response

Create a new group

Parameters:

  • name (String)

    Group name

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



26
27
28
29
# File 'lib/backlog_kit/client/group.rb', line 26

def create_group(name, params = {})
  params[:name] = name
  post('groups', params)
end

#delete_group(group_id) ⇒ BacklogKit::Response

Delete a group

Parameters:

  • group_id (Integer, String)

    Group id

Returns:



44
45
46
# File 'lib/backlog_kit/client/group.rb', line 44

def delete_group(group_id)
  delete("groups/#{group_id}")
end

#get_group(group_id) ⇒ BacklogKit::Response

Get a group

Parameters:

  • group_id (Integer, String)

    Group id

Returns:



17
18
19
# File 'lib/backlog_kit/client/group.rb', line 17

def get_group(group_id)
  get("groups/#{group_id}")
end

#get_groups(params = {}) ⇒ BacklogKit::Response

Get list of groups

Parameters:

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



9
10
11
# File 'lib/backlog_kit/client/group.rb', line 9

def get_groups(params = {})
  get('groups', params)
end

#update_group(group_id, params = {}) ⇒ BacklogKit::Response

Update a group

Parameters:

  • group_id (Integer, String)

    Group id

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



36
37
38
# File 'lib/backlog_kit/client/group.rb', line 36

def update_group(group_id, params = {})
  patch("groups/#{group_id}", params)
end