Sha256: d652cca3aee500a0384000090c300442cbba6033cc18d300f72982af97c029e6
Contents?: true
Size: 675 Bytes
Versions: 1
Compression:
Stored size: 675 Bytes
Contents
require 'kintone/command' require 'kintone/api' class Kintone::Command::Records PATH = "records.json" def initialize(api) @api = api end def get(app, query, fields) params = {:app => app, :query => query} fields.each_with_index {|v, i| params["fields[#{i}]"] = v} return @api.get(PATH, params) end def create(app, records) return @api.post(PATH, {:app => app, :records => records}) end def update(app, records) return @api.put(PATH, {:app => app, :records => records}) end def delete(app, ids) params = {:app => app} ids.each_with_index {|v, i| params["ids[#{i}]"] = v} return @api.delete(PATH, params) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kintone-0.0.2 | lib/kintone/command/records.rb |