lib/runcible/resources/repository.rb in runcible-1.9.2 vs lib/runcible/resources/repository.rb in runcible-1.9.3

- old
+ new

@@ -1,10 +1,10 @@ require 'active_support/core_ext/hash' module Runcible module Resources - # @see https://pulp-dev-guide.readthedocs.org/en/latest/rest-api/repo/index.html + # @see https://docs.pulpproject.org/dev-guide/integration/rest-api/repo/index.html class Repository < Runcible::Base # Generates the API path for Repositories # # @param [String] id the id of the repository # @return [String] the repository path, may contain the id if passed @@ -94,9 +94,18 @@ # @param [String] id the id of the repository # @param [Hash] optional container for all optional parameters # @return [RestClient::Response] def sync(id, optional = {}) call(:post, "#{path(id)}actions/sync/", :payload => { :optional => optional }) + end + + # Downloads all units in a repository (useful in the case of on_demand repositories) + # + # @param [String] id the id of the repository + # @param [Hash] optional container for all optional parameters + # @return [RestClient::Response] + def download(id, optional = {}) + call(:post, "#{path(id)}actions/download/", :payload => { :optional => optional }) end # History of all sync actions on a repository # # @param [String] id the id of the repository