module BWAPI::Client::Projects::Group::SiteGroup

SiteGroup module for projects/group/site endpoints

Public Instance Methods

create_site_group(project_id, opts = {}) click to toggle source

Create a new site group in project

@param project_id [Integer] Id of project @param opts [Hash] options hash of parameters @option opts [String] name The human readable name for the group @option opts [Integer] userId The id of the creating user @option opts [Array] sharedProjectIds The ids of the shared projects @option opts [String] shared The type of sharing for the group @option opts [Array] sites The sites in the group @return [Hash] New site group

# File lib/bwapi/client/projects/group/site_group.rb, line 34
def create_site_group(project_id, opts = {})
  post "projects/#{project_id}/group/site", opts
end
delete_site_group(project_id, site_group_id) click to toggle source

Delete an existing site group project

@param project_id [Integer] Id of project @param site_group_id [Integer] Id of site group @return [Hash] Deleted site group

# File lib/bwapi/client/projects/group/site_group.rb, line 59
def delete_site_group(project_id, site_group_id)
  delete "projects/#{project_id}/group/site/#{site_group_id}"
end
get_site_group(project_id, site_group_id) click to toggle source

Get a specific site group in project

@param project_id [Integer] Id of project @param site_group_id [Integer] Id of site group @return [Hash] Specific site group

# File lib/bwapi/client/projects/group/site_group.rb, line 20
def get_site_group(project_id, site_group_id)
  get "projects/#{project_id}/group/site/#{site_group_id}"
end
site_groups_summary(project_id, opts = {}) click to toggle source

Get summary of all site groups in project

@param project_id [Integer] Id of project @return [Hash] Summary of all site groups in project

# File lib/bwapi/client/projects/group/site_group.rb, line 11
def site_groups_summary(project_id, opts = {})
  get "projects/#{project_id}/group/site/summary", opts
end
update_site_group(project_id, site_group_id, opts = {}) click to toggle source

Update an existing site group in project

@param project_id [Integer] Id of project @param site_group_id [Integer] Id of site group @param opts [Hash] options hash of parameter @option opts [Integer] id The id of the group @option opts [String] name The human readable name for the group @option opts [Integer] userId The id of the creating user @option opts [Array] sharedProjectIds The ids of the shared projects @option opts [String] shared The type of sharing for the group @option opts [Array] sites The sites in the group @return [Hash] Updated site group

# File lib/bwapi/client/projects/group/site_group.rb, line 50
def update_site_group(project_id, site_group_id, opts = {})
  put "projects/#{project_id}/group/site/#{site_group_id}", opts
end