lib/restful_resource/base.rb in restful_resource-0.8.25 vs lib/restful_resource/base.rb in restful_resource-0.8.26
- old
+ new
@@ -31,9 +31,14 @@
def self.get(params={})
response = http.get(collection_url(params))
RestfulResource::OpenObject.new(parse_json(response.body))
end
+ def self.delete(id, **params)
+ response = http.delete(member_url(id, params))
+ RestfulResource::OpenObject.new(parse_json(response.body))
+ end
+
def self.put(id, data: {}, **params)
url = member_url(id, params)
response = http.put(url, data: data)
self.new(parse_json(response.body))