RubyGems Navigation menu

RedcapAPI 0.0.6

This gem is still under active development. Please contact me directly with any questions or suggestions. To start: r = RedcapAPI.new(token, url) # your institution has it's own url, and each project has it's own token r.get(optional record_id) # returns all records in JSON format or a specific record if specified r.get_fields # returns all fields for that instrument r.post(data) # this will either update an old record or create a new one. the data should be in form of array of hashes or as a hash (for one item). dates are accepted in Date class or in strftime('%F') format. for example data = {name: 'this is a test', field_2: Date.today} r.post(data) # creates a new object using the fields above. field names must match those in the existing project "{\"count\": 1}" --> indicates the object posted. to update an existing record: data = {record_id: 3, name: 'this is a test to update', field_2: Date.today} r.post(data) # this will update the record with record_id 3. if record_id 3 does not exist it will create an entry with that record id

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 0.0.6 - June 18, 2015 (9.5 KB)
  2. 0.0.6a - June 18, 2015 (9.0 KB)
  3. 0.0.5 - July 13, 2014 (7.0 KB)
  4. 0.0.5b - July 13, 2014 (7.5 KB)
  5. 0.0.5a - July 13, 2014 (7.5 KB)
显示所有版本 (共 9 个)

Runtime 依赖 (2):

json >= 0
mechanize >= 0

Development 依赖 (4):

bundler ~> 1.6
csv >= 0
nokogiri >= 0
rake >= 0

业主:

作者:

  • eugyev

SHA 256 校验和:

= 复制到剪贴板 已复制!

下载总量 21,312

这个版本 3,190

许可:

MIT

需要的 Ruby 版本: >= 0

链接: