lib/flydata/api/base.rb in flydata-0.0.1.nc2 vs lib/flydata/api/base.rb in flydata-0.0.1.2011101801
- old
+ new
@@ -3,10 +3,10 @@
class Base
def initialize(api_client)
@client = api_client
end
def list(params={})
- @client.get(@url_path)
+ JSON.parse(@client.get(@url_path))
end
def create(params={})
params.each {|k, v| @url_path.gsub!(/:#{k}/, v.to_s)}
@client.post(@url_path, @model_name => params)
end