Class: Ghee::API::Repos::Issues::Labels::Proxy
- Inherits:
-
ResourceProxy
- Object
- ResourceProxy
- Ghee::API::Repos::Issues::Labels::Proxy
- Defined in:
- lib/ghee/api/issues.rb
Instance Attribute Summary
Attributes inherited from ResourceProxy
#connection, #current_page, #id, #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
accept_header, #all, #all_parallel, #build_prefix, #initialize, #method_missing, #paginate, #raw, #subject
Methods included from CUD
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
44 45 46 |
# File 'lib/ghee/api/issues.rb', line 44 def add(labels) connection.post(path_prefix,labels).body end |
#remove ⇒ Object
Destroys label by id
return boolean
60 61 62 |
# File 'lib/ghee/api/issues.rb', line 60 def remove connection.delete(path_prefix).status == 204 end |
#replace(labels) ⇒ Object
Patchs and existing label
return json
52 53 54 |
# File 'lib/ghee/api/issues.rb', line 52 def replace(labels) connection.put(path_prefix, labels).body end |