lib/etsy/request.rb in etsy-0.2.2 vs lib/etsy/request.rb in etsy-0.2.3
- old
+ new
@@ -20,10 +20,17 @@
def self.put(resource_path, parameters = {})
request = Request.new(resource_path, parameters)
Response.new(request.put)
end
+
+ def self.delete(resource_path, parameters = {})
+ request = Request.new(resource_path, parameters)
+ Response.new(request.delete)
+ end
+
+
# Create a new request for the resource with optional parameters
def initialize(resource_path, parameters = {})
parameters = parameters.dup
@token = parameters.delete(:access_token) || Etsy.credentials[:access_token]
@@ -65,9 +72,13 @@
end
end
def put
client.put(endpoint_url)
+ end
+
+ def delete
+ client.delete(endpoint_url)
end
def client # :nodoc:
@client ||= secure? ? secure_client : basic_client
end