class Gitomator::Service::Tagging

Public Instance Methods

add_tags(namespace, id_or_name, *tags) click to toggle source

Add `tag` to object (the object with the given `id_or_name` in the given `namespace`)

@param namespace [String] @param id_or_name [String/Number] @param tags [*String]

# File lib/gitomator/service/tagging.rb, line 16
def add_tags(namespace, id_or_name, *tags)
  service_call(__callee__, namespace, id_or_name, *tags)
end
delete_metadata(namespace, tag) click to toggle source

Delete all metadata associated with the given tag (in the given namespace).

@param namespace [String] @param tag [String]

# File lib/gitomator/service/tagging.rb, line 92
def delete_metadata(namespace, tag)
  service_call(__callee__, namespace, tag)
end
metadata(namespace, tag=nil) click to toggle source

Get the metadata associated with the given tag in the given namespace. If a `tag` is not specified, get metadata for all tags in the namespace.

@param namespace [String] @param tag [String]

@return [Hash<String,Object>] The tag's metadata. If no tag was specified, return a Hash that maps each tag to its metadata.

# File lib/gitomator/service/tagging.rb, line 68
def metadata(namespace, tag=nil)
  service_call(__callee__, namespace, tag)
end
remove_tag(namespace, id_or_name, tag) click to toggle source

Remove tag from object.

@param namespace [String] @param id_or_name [String/Number] @param tag [String]

# File lib/gitomator/service/tagging.rb, line 28
def remove_tag(namespace, id_or_name, tag)
  service_call(__callee__, namespace, id_or_name, tag)
end
set_metadata(namespace, tag, metadata) click to toggle source

Add the given metadata to the given tag (in the given namespace). You can remove metadata properties by updating their value to nil.

@param namespace [String] @param tag [String] @param metadata [String]

# File lib/gitomator/service/tagging.rb, line 81
def set_metadata(namespace, tag, metadata)
  service_call(__callee__, namespace, tag, metadata)
end
tags(namespace, id_or_name) click to toggle source

Get all tags associated with the specified object.

@param namespace [String] @param id_or_name [String/Number]

@return [Array<String>]

# File lib/gitomator/service/tagging.rb, line 41
def tags(namespace, id_or_name)
  service_call(__callee__, namespace, id_or_name)
end