lib/imaginary.rb in imaginary-0.0.1 vs lib/imaginary.rb in imaginary-0.2.0
- old
+ new
@@ -16,11 +16,11 @@
params[:basic_auth] ||= @auth
self.class.post(url, params)
end
def add_image_from_file(file, name = nil)
- r = post("#{@base_url}/api/buckets/#{@bucket}/images.json", body: { image: {
+ r = post("#{@base_url}buckets/#{@bucket}/images.json", body: { image: {
name: name,
image: file
}})
if r["errors"]
@@ -29,10 +29,10 @@
r["name"]
end
end
def add_image_from_url(url, name = nil)
- r = post("#{@base_url}/api/buckets/#{@bucket}/images.json", body: { image: {
+ r = post("#{@base_url}buckets/#{@bucket}/images.json", body: { image: {
name: name,
image_url: url
}})
if r["errors"]