Class: Ghee::API::Issues::Labels::Proxy
- Inherits:
-
ResourceProxy
- Object
- ResourceProxy
- Ghee::API::Issues::Labels::Proxy
- Defined in:
- lib/ghee/api/issues.rb
Instance Attribute Summary
Attributes inherited from ResourceProxy
#connection, #current_page, #pagination, #params, #path_prefix, #total
Instance Method Summary collapse
-
#add(labels) ⇒ Object
Creates label for an issue using the authenicated user.
-
#remove ⇒ Object
Destroys label by id.
-
#replace(labels) ⇒ Object
Patchs and existing label.
Methods inherited from ResourceProxy
#all, #initialize, #method_missing, #paginate, #subject
Constructor Details
This class inherits a constructor from Ghee::ResourceProxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ghee::ResourceProxy
Instance Method Details
#add(labels) ⇒ Object
Creates label for an issue using the authenicated user
labels - Array of labels
return json
26 27 28 |
# File 'lib/ghee/api/issues.rb', line 26 def add(labels) connection.post(path_prefix,labels).body end |
#remove ⇒ Object
Destroys label by id
return boolean
42 43 44 |
# File 'lib/ghee/api/issues.rb', line 42 def remove connection.delete(path_prefix).status == 204 end |
#replace(labels) ⇒ Object
Patchs and existing label
return json
34 35 36 |
# File 'lib/ghee/api/issues.rb', line 34 def replace(labels) connection.put(path_prefix, labels).body end |