Sha256: fcabd33938f0ec9235c1366afa34a2d19c857c8ad5bb435cf4316cd5e0460ff6

Contents?: true

Size: 675 Bytes

Versions: 20

Compression:

Stored size: 675 Bytes

Contents

require 'flydata/api/base'

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

20 entries across 20 versions & 1 rubygems

Version Path
flydata-0.4.0 lib/flydata/api/data_entry.rb
flydata-0.3.24 lib/flydata/api/data_entry.rb
flydata-0.3.23 lib/flydata/api/data_entry.rb
flydata-0.3.22 lib/flydata/api/data_entry.rb
flydata-0.3.21 lib/flydata/api/data_entry.rb
flydata-0.3.20 lib/flydata/api/data_entry.rb
flydata-0.3.19 lib/flydata/api/data_entry.rb
flydata-0.3.18 lib/flydata/api/data_entry.rb
flydata-0.3.17 lib/flydata/api/data_entry.rb
flydata-0.3.16 lib/flydata/api/data_entry.rb
flydata-0.3.15 lib/flydata/api/data_entry.rb
flydata-0.3.14 lib/flydata/api/data_entry.rb
flydata-0.3.13 lib/flydata/api/data_entry.rb
flydata-0.3.12 lib/flydata/api/data_entry.rb
flydata-0.3.11 lib/flydata/api/data_entry.rb
flydata-0.3.10 lib/flydata/api/data_entry.rb
flydata-0.3.9 lib/flydata/api/data_entry.rb
flydata-0.3.8 lib/flydata/api/data_entry.rb
flydata-0.3.7 lib/flydata/api/data_entry.rb
flydata-0.3.6 lib/flydata/api/data_entry.rb