module BWAPI::Client::Projects::QueryGroups

QueryGroups module for projects/queryGroups endpoints

Public Instance Methods

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

Create a new query group in project

@param project_id [Integer] Id of project @param opts [Hash] options hash of parameters @option opts [Integer] id Id of the query group @option opts [String] name Name of the query group @option opts [String] shared Shared mode of query group @option opts [Array] users Users which this query group belongs to @option opts [Array] queries Queries within the query group @option opts [Hash] sharedProjectIds Projects which this query group belongs to @return [Hash] New query group

# File lib/bwapi/client/projects/query_groups.rb, line 36
def create_query_group(project_id, opts = {})
  post "projects/#{project_id}/querygroups", opts
end
delete_query_group(project_id, query_group_id) click to toggle source

Delete an existing query group in project

@param project_id [Integer] Id of project @param query_group_id [Integer] Id of query group @return [Hash] Deleted query group

# File lib/bwapi/client/projects/query_groups.rb, line 61
def delete_query_group(project_id, query_group_id)
  delete "projects/#{project_id}/querygroups/#{query_group_id}"
end
get_query_group(project_id, query_group_id) click to toggle source

Get a specific query group in project

@param project_id [Integer] Id of project @param query_group_id [Integer] Id of query group @return [Hash] Specific query group

# File lib/bwapi/client/projects/query_groups.rb, line 21
def get_query_group(project_id, query_group_id)
  get "projects/#{project_id}/querygroups/#{query_group_id}"
end
query_groups(project_id, opts = {}) click to toggle source

Get all query groups in project

@param project_id [Integer] Id of project @option opts [Integer] page Page of projects to retrieve @option opts [Integer] pageSize Results per page of results @return [Hash] All query groups in project

# File lib/bwapi/client/projects/query_groups.rb, line 12
def query_groups(project_id, opts = {})
  get "projects/#{project_id}/querygroups", opts
end
update_query_group(project_id, query_group_id, opts = {}) click to toggle source

Update an existing query group in project

@param project_id [Integer] Id of project @param query_group_id [Integer] Id of query group @param opts [Hash] options hash of parameters @option opts [Integer] queryGroupId of the query group @option opts [String] name Name of the query group @option opts [String] shared Shared mode of query group @option opts [Array] users Users which this query group belongs to @option opts [Array] queries Queries within the query group @option opts [Hash] sharedProjectIds Projects which this query group belongs to @return [Hash] New query group

# File lib/bwapi/client/projects/query_groups.rb, line 52
def update_query_group(project_id, query_group_id, opts = {})
  put "projects/#{project_id}/querygroups/#{query_group_id}", opts
end