lib/flydata/api/data_entry.rb in flydata-0.3.4 vs lib/flydata/api/data_entry.rb in flydata-0.3.5

- old
+ new

@@ -5,15 +5,16 @@ @model_name = 'data_entry' @url_path = "/data_ports/:data_port_id/#{@model_name.pluralize}" super end - def buffer_stat(data_entry_id, mode = nil) - @client.get("/#{@model_name.pluralize}/#{data_entry_id}/buffer_stat/#{mode}") + def buffer_stat(data_entry_id, params = {}) + tables = params[:tables] ? params[:tables].join(',') : '' + @client.get("/#{@model_name.pluralize}/#{data_entry_id}/buffer_stat/#{params[:mode]}?tables=#{tables}") end - + def cleanup_sync(data_entry_id, tables) - @client.post("/#{@model_name.pluralize}/#{data_entry_id}/cleanup_sync", nil, {tables: tables.join(',')}) + @client.post("/#{@model_name.pluralize}/#{data_entry_id}/cleanup_sync", nil, {tables: tables.join(',')}) end end end end