module BWAPI::Client::Projects::Tags

Tags module for projects/tags endpoints

Public Instance Methods

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

Create a new tag in project

@param project_id [Integer] Id of project @param opts [Hash] options hash of parameters @option opts [Integer] id Id of the tag @option opts [String] name Name of the tag @return [Hash] New tag

# File lib/bwapi/client/projects/tags.rb, line 32
def create_tag(project_id, opts = {})
  post "projects/#{project_id}/tags", opts
end
delete_tag(project_id, tag_id) click to toggle source

Delete an existing tag in project

@param project_id [Integer] Id of project @param tag_id [Integer] Id of tag @return [Hash] Deleted tag

# File lib/bwapi/client/projects/tags.rb, line 53
def delete_tag(project_id, tag_id)
  delete "projects/#{project_id}/tags/#{tag_id}"
end
get_tag(project_id, tag_id) click to toggle source

Get a specific tag in project

@param project_id [Integer] Id of project @param tag_id [Integer] Id of tag @return [Hash] Specific tag

# File lib/bwapi/client/projects/tags.rb, line 21
def get_tag(project_id, tag_id)
  get "projects/#{project_id}/tags/#{tag_id}"
end
tags(project_id, opts = {}) click to toggle source

Get all tags 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 tags in project

# File lib/bwapi/client/projects/tags.rb, line 12
def tags(project_id, opts = {})
  get "projects/#{project_id}/tags", opts
end
update_tag(project_id, tag_id, opts = {}) click to toggle source

Update an existing tag in project

@param project_id [Integer] Id of project @param tag_id [Integer] Id of tag @param opts [Hash] options hash of parameters @option opts [Integer] id Id of the tag @option opts [String] name Name of the tag @return [Hash] Updated tag

# File lib/bwapi/client/projects/tags.rb, line 44
def update_tag(project_id, tag_id, opts = {})
  put "projects/#{project_id}/tags/#{tag_id}", opts
end