lib/runcible/resources/consumer.rb in runcible-1.0.6 vs lib/runcible/resources/consumer.rb in runcible-1.0.7
- old
+ new
@@ -28,11 +28,11 @@
class Consumer < Runcible::Base
# Generates the API path for Consumers
#
# @param [String] id the ID of the consumer
- # @return [String] the consumer path, may contain the id if passed
+ # @return [String] the consumer path, may contain the id if passed
def self.path(id=nil)
(id == nil) ? "consumers/" : "consumers/#{id}/"
end
# Creates a consumer
@@ -161,15 +161,23 @@
def uninstall_units(id, units, options={})
required = required_params(binding.send(:local_variables), binding, ["id"])
call(:post, path("#{id}/actions/content/uninstall/"), :payload => { :required => required })
end
- # Determine if a set of content is applicable to a consumer
+ # (Re)Generate applicability for some set of consumers
#
- # @param [Hash] options hash of uninstall options
+ # @param [Hash] options payload representing criteria
# @return [RestClient::Response]
+ def regenerate_applicability(options = {})
+ call(:post, path("actions/content/regenerate_applicability/"), :payload => { :required => options})
+ end
+
+ # retrieve the applicability for some set of consumers
+ #
+ # @param [Hash] options hash representing criteria
+ # @return [RestClient::Response]
def applicability(options={})
- call(:post, path("actions/content/applicability/"), :payload => { :required => options })
+ call(:post, path + "content/applicability/", :payload => { :required => options })
end
end
end
end