lib/fastly/service.rb in fastly-1.00 vs lib/fastly/service.rb in fastly-1.01
- old
+ new
@@ -57,17 +57,17 @@
fetcher.get(Fastly::Invoice, opts)
end
# Purge all assets from this service.
def purge_all
- res = client.put(get_path(self.id)+"/purge_all")
+ res = fetcher.client.post(Fastly::Service.get_path(self.id)+"/purge_all")
end
# Purge anything with the specific key from the given service.
def purge_by_key(key)
- res = client.put(get_path(self.id)+"/purge/#{key}")
+ res = fetcher.client.post(Fastly::Service.get_path(self.id)+"/purge/#{key}")
end
# Set all the versions that this service has had.
def versions=(versions)
@versions = versions
@@ -83,11 +83,11 @@
versions[number]
end
# A deep hash of nested details
def details(opts={})
- client.get(get_path(self.id)+"/details", opts);
+ fetcher.client.get(Fastly::Service.get_path(self.id)+"/details", opts);
end
# Get the Customer object for this Service
def customer
fetcher.get(Fastly::Customer, customer_id)
@@ -107,6 +107,6 @@
klass = Fastly::Service
hash = client.get(klass.post_path+"/search", opts)
return nil if hash.nil?
klass.new(hash, self)
end
-end
\ No newline at end of file
+end