Sha256: cb354bd20f088122a830e8f431503e985b2e5351acaf89d11c85d258d0ce2c9f

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

require 'kintone/command'
require 'kintone/api'

class Kintone::Command::Record
  PATH = "record"

  def initialize(api)
    @api = api
    @url = @api.get_url(PATH)
  end

  def get(app, id)
    @api.get(@url, {:app => app, :id => id})
  end

  def create(app, record)
    @api.post(@url, {:app => app, :record => record})
  end

  def update(app, id, record)
    @api.put(@url, {:app => app, :id => id, :record => record})
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kintone-0.0.4 lib/kintone/command/record.rb
kintone-0.0.3 lib/kintone/command/record.rb