Class: Ghee::API::Repos::Issues::Labels::Proxy

Inherits:
ResourceProxy show all
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

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



27
28
29
# File 'lib/ghee/api/issues.rb', line 27

def add(labels)
  connection.post(path_prefix,labels).body
end

#removeObject

Destroys label by id

return boolean



43
44
45
# File 'lib/ghee/api/issues.rb', line 43

def remove
  connection.delete(path_prefix).status == 204
end

#replace(labels) ⇒ Object

Patchs and existing label

return json



35
36
37
# File 'lib/ghee/api/issues.rb', line 35

def replace(labels)
  connection.put(path_prefix, labels).body
end