Sha256: bd94dc60dcc72f98a2c1490031e94ecc8e4df1b845a8ee83114d271e1b2bfa29
Contents?: true
Size: 900 Bytes
Versions: 11
Compression:
Stored size: 900 Bytes
Contents
module Runcible module Resources # @see https://pulp-dev-guide.readthedocs.org/en/latest/rest-api/content/index.html class Unit < Runcible::Base # Generates the API path for Units # # @param [String] type the unit type # @return [String] the unit search path def path(type) "content/units/#{type}/search/" end # Searches a given unit type based on criteria # # @param [String] type the unit type # @param [Hash] criteria criteria object containing Mongo syntax # @param [Hash] optional container for all optional parameters # @return [RestClient::Response] def search(type, criteria, optional = {}) call(:post, path(type), :payload => {:required => {:criteria => criteria}, :optional => optional}) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems