Module: BWAPI::Client::Projects::Group::AuthorGroup

Included in:
BWAPI::Client::Projects::Group
Defined in:
lib/bwapi/client/projects/group/author_group.rb

Overview

AuthorGroup module for projects/group/author endpoints

Instance Method Summary collapse

Instance Method Details

#author_groups_summary(project_id, opts = {}) ⇒ Hashie::Mash

Get summary of all author groups in project

Parameters:

  • project_id (Integer)

    Id of project

Returns:

  • (Hashie::Mash)

    Summary of all author groups in project



13
14
15
# File 'lib/bwapi/client/projects/group/author_group.rb', line 13

def author_groups_summary(project_id, opts = {})
  get "projects/#{project_id}/group/author/summary", opts
end

#create_author_group(project_id, opts = {}) ⇒ Hashie::Mash

Create a new author group in project

Parameters:

  • project_id (Integer)

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • name (String)

    The human readable name for the group

  • userId (Integer)

    The id of the creating user

  • sharedProjectIds (Array)

    The ids of the shared projects

  • shared (String)

    The type of sharing for the group

  • authors (Array)

    The authors in the group

Returns:

  • (Hashie::Mash)

    New author group



36
37
38
# File 'lib/bwapi/client/projects/group/author_group.rb', line 36

def create_author_group(project_id, opts = {})
  post "projects/#{project_id}/group/author", opts
end

#delete_author_group(project_id, author_group_id) ⇒ Hashie::Mash

Delete an existing author group project

Parameters:

  • project_id (Integer)

    Id of project

  • author_group_id (Integer)

    Id of author group

Returns:

  • (Hashie::Mash)

    Deleted author group



61
62
63
# File 'lib/bwapi/client/projects/group/author_group.rb', line 61

def delete_author_group(project_id, author_group_id)
  delete "projects/#{project_id}/group/author/#{author_group_id}"
end

#get_author_group(project_id, author_group_id) ⇒ Hashie::Mash

Get a specific author group in project

Parameters:

  • project_id (Integer)

    Id of project

  • author_group_id (Integer)

    Id of author group

Returns:

  • (Hashie::Mash)

    Specific author group



22
23
24
# File 'lib/bwapi/client/projects/group/author_group.rb', line 22

def get_author_group(project_id, author_group_id)
  get "projects/#{project_id}/group/author/#{author_group_id}"
end

#update_author_group(project_id, author_group_id, opts = {}) ⇒ Hashie::Mash

Update an existing author group in project

Parameters:

  • project_id (Integer)

    Id of project

  • author_group_id (Integer)

    Id of author group

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

    options hash of parameter

Options Hash (opts):

  • id (Integer)

    The id of the group

  • name (String)

    The human readable name for the group

  • userId (Integer)

    The id of the creating user

  • sharedProjectIds (Array)

    The ids of the shared projects

  • shared (String)

    The type of sharing for the group

  • authors (Array)

    The authors in the group

Returns:

  • (Hashie::Mash)

    Updated author group



52
53
54
# File 'lib/bwapi/client/projects/group/author_group.rb', line 52

def update_author_group(project_id, author_group_id, opts = {})
  put "projects/#{project_id}/group/author/#{author_group_id}", opts
end