Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 27 additions and 2 deletions.
  1. +1 −1  VERSION
  2. +25 −0 lib/netdnarws.rb
  3. +1 −1  lib/netdnarws/version.rb
View
2  VERSION
@@ -1 +1 @@
-0.2.4
+0.2.5
View
25 lib/netdnarws.rb
@@ -100,5 +100,30 @@ def delete uri, data={}, options={}
options[:body] = false
self._response_as_json 'delete', uri, options, data
end
+
+ def purge zone_id, file_or_files=nil
+ if file_or_files.respond_to? :each
+ responses = Hash.new
+
+ file_or_files.each { |e|
+ responses[e] = self.delete(
+ "/zones/pull.json/#{zone_id}/cache",
+ {'file' => e},
+ :debug_json => true
+ )
+ }
+ return responses
+ end
+
+
+ unless file_or_files.nil?
+ return self.delete(
+ "/zones/pull.json/#{zone_id}/cache",
+ {'file' => file_or_files}
+ )
+ end
+
+ self.delete("/zones/pull.json/#{zone_id}/cache")
+ end
end
end
View
2  lib/netdnarws/version.rb
@@ -1,3 +1,3 @@
module NetDNARWS
- VERSION = "0.2.4"
+ VERSION = "0.2.5"
end

No commit comments for this range

Something went wrong with that request. Please try again.