Sha256: f718419dc132b7c982a6d2914c777181e7d5031bcdf0d8d27ff88c3c33a1a910

Contents?: true

Size: 475 Bytes

Versions: 5

Compression:

Stored size: 475 Bytes

Contents

require 'kintone/command'

class Kintone::Command::Record < Kintone::Command
  def self.path
    'record'
  end

  def get(app, id)
    @api.get(@url, app: app, id: id)
  end

  def register(app, record)
    @api.post(@url, app: app, record: record.to_kintone)
  end

  def update(app, id, record, revision: nil)
    body = { app: app, id: id, record: record.to_kintone }
    body[:revision] = revision if revision
    @api.put(@url, body)
  end

  alias create register
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
kintone_rb-1.0.1 lib/kintone/command/record.rb
kintone_rb-1.0.0 lib/kintone/command/record.rb
kintone-oauth-extension-0.2.2 lib/kintone/command/record.rb
kintone-oauth-extension-0.2.1 lib/kintone/command/record.rb
kintone-0.1.5 lib/kintone/command/record.rb