Sha256: ce9d0f9e9b3078aa846f47b858c3b044a41cb79912cbab29ef390fcb2ed879ee

Contents?: true

Size: 647 Bytes

Versions: 1

Compression:

Stored size: 647 Bytes

Contents

module Flydata
  module Api
    class DataEntry < Base
      def initialize(api_client)
        @model_name = 'data_entry'
        @url_path = "/data_ports/:data_port_id/#{@model_name.pluralize}"
        super
      end

      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(',')})
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flydata-0.3.5 lib/flydata/api/data_entry.rb