Class: Gitomator::Service::Tagging
- Inherits:
-
BaseService
- Object
- BaseService
- Gitomator::Service::Tagging
- Defined in:
- lib/gitomator/service/tagging.rb
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
-
#add_tags(namespace, id_or_name, *tags) ⇒ Object
Add ‘tag` to object (the object with the given `id_or_name` in the given `namespace`).
-
#delete_metadata(namespace, tag) ⇒ Object
Delete all metadata associated with the given tag (in the given namespace).
-
#metadata(namespace, tag = nil) ⇒ Hash<String,Object>
Get the metadata associated with the given tag in the given namespace.
-
#remove_tag(namespace, id_or_name, tag) ⇒ Object
Remove tag from object.
-
#search(namespace, query) ⇒ Object
Search for objects by tag(s).
-
#set_metadata(namespace, tag, metadata) ⇒ Object
Add the given metadata to the given tag (in the given namespace).
-
#tags(namespace, id_or_name) ⇒ Array<String>
Get all tags associated with the specified object.
Methods inherited from BaseService
#after_each_service_call, #before_each_service_call, #initialize, #on_service_call_error, #service_call
Constructor Details
This class inherits a constructor from Gitomator::BaseService
Instance Method Details
#add_tags(namespace, id_or_name, *tags) ⇒ Object
Add ‘tag` to object (the object with the given `id_or_name` in the given `namespace`)
16 17 18 |
# File 'lib/gitomator/service/tagging.rb', line 16 def (namespace, id_or_name, *) service_call(__callee__, namespace, id_or_name, *) end |
#delete_metadata(namespace, tag) ⇒ Object
Delete all metadata associated with the given tag (in the given namespace).
92 93 94 |
# File 'lib/gitomator/service/tagging.rb', line 92 def (namespace, tag) service_call(__callee__, namespace, tag) end |
#metadata(namespace, tag = nil) ⇒ Hash<String,Object>
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.
68 69 70 |
# File 'lib/gitomator/service/tagging.rb', line 68 def (namespace, tag=nil) service_call(__callee__, namespace, tag) end |
#remove_tag(namespace, id_or_name, tag) ⇒ Object
Remove tag from object.
28 29 30 |
# 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 |
#search(namespace, query) ⇒ Object
Search for objects by tag(s).
54 55 56 |
# File 'lib/gitomator/service/tagging.rb', line 54 def search(namespace, query) service_call(__callee__, namespace, query) end |
#set_metadata(namespace, tag, metadata) ⇒ Object
Add the given metadata to the given tag (in the given namespace). You can remove metadata properties by updating their value to nil.
81 82 83 |
# File 'lib/gitomator/service/tagging.rb', line 81 def (namespace, tag, ) service_call(__callee__, namespace, tag, ) end |
#tags(namespace, id_or_name) ⇒ Array<String>
Get all tags associated with the specified object.
41 42 43 |
# File 'lib/gitomator/service/tagging.rb', line 41 def (namespace, id_or_name) service_call(__callee__, namespace, id_or_name) end |