RedcapAPI 0.0.5b → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODhlYTM5MDg1Mjc2NjNiMmNjMDI4MjQxZDlmMDcyNjk5OTJlZDkwZQ==
4
+ YWRmMmY4MDRhZmFhZWRkYTJjNGY2NjNmMjQ4Njk2NDUwMWJiNDYyNg==
5
5
  data.tar.gz: !binary |-
6
- YTgwYmJiNjBiNzJlMWVmNjU0ZmI2ZGVhMzU3MDI4MzZjMGJmNDFhNw==
6
+ NWU2OGY2NmExMTM1YjY2ZjgzOTRmYmZjZTM2ZjBkZjg5MWNhYmFjOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NThkM2M2NDY0ZmNmYmMyMDVhNmFlODgyOTQ5ZTNiZmIzNzZmODdiOWYyYjhm
10
- YzBkMDIyOTMwMzY2YWQ1YjU1ODUyZDE1NDliZDBiZjdkYjYwYTlkNzhkMjU5
11
- MDVhYzczNmIzOThjOWViMzliNDc2YTE2NGI2MDI2YTJjNTFjMTc=
9
+ NGY2MDNlNGUwMmUyZTA5MzczYTM0MWUwZGYxNDhkZDMyNjVjNGU2ZGYxOTBk
10
+ MDhmYmE2ZmNhNTVmMGM0YmE2M2I0ODYyYjliNmIyYzczZTFmYzRiMDkzOGUy
11
+ YjU5MmZhOGJmZDQyOGM2ZGFjMTk3ZWU1MzgwZGQxNWQ2YzRhZTg=
12
12
  data.tar.gz: !binary |-
13
- ODQ5ZTllOGRjYjE2Yjc0ZmI4NTViYmZlMWI5OGM2MWVhZTRkZGVmNDA1NWE5
14
- NjZiMGE3YTZlNDc3YjRiZjVhZTVhMzRhNDhiZWU5Yjc0MTc2ZTkwYjY4NjZl
15
- ZmEyN2EzMWE0ZGJkZTE0YjRiNzk1ZGFlZjM5MTgzYTQ2ODg1MjA=
13
+ YWQ0ODcyNGNiYTI3NmEyMmIwMjAwZGE1YWNiZjkyNWU2YmM5NDllOGZmNjI3
14
+ NDM2NWM2ODRmY2FjNGU1ZGM4MjY2MDFjNDZiOWE2NjljMTY5YTlmZmRmNDRh
15
+ N2NlNWJhODJhYjY5YjAwMTAwNWZlMmIzM2IxODFhMTg0NWNlMmE=
data/README.md CHANGED
@@ -3,26 +3,12 @@
3
3
  This is an api to utilize REDCAP api with ruby. This Gem requires mechanize as a dependency.
4
4
  it is based on instructions here http://sburns.org/2013/07/22/intro-to-redcap-api.html
5
5
 
6
- This gem is still under active development. Please contact me directly with any questions or suggestions.
7
-
8
6
  To start:
9
7
 
10
8
  r = RedcapAPI.new(token, url) # your institution has it's own url, and each project has it's own token
11
9
 
12
10
  r.get(optional record_id) # returns all records in JSON format or a specific record if specified
13
11
 
14
- r.get_fields # returns all fields for that instrument
15
-
16
- 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.
17
- for example
18
- data = {name: 'this is a test', field_2: Date.today}
19
- r.post(data) # creates a new object using the fields above. field names must match those in the existing project
20
- "{\"count\": 1}" --> indicates the object posted.
21
-
22
- to update an existing record:
23
- data = {record_id: 3, name: 'this is a test to update', field_2: Date.today}
24
- 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
25
-
26
12
  ## Contributing
27
13
 
28
14
  1. Fork it ( https://github.com/[my-github-username]/RedcapAPI/fork )
data/RedcapAPI.gemspec CHANGED
@@ -23,15 +23,6 @@ Gem::Specification.new do |spec|
23
23
  r.get_fields # returns all fields for that instrument
24
24
 
25
25
  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.
26
- for example
27
- data = {name: 'this is a test', field_2: Date.today}
28
- r.post(data) # creates a new object using the fields above. field names must match those in the existing project
29
- "{\"count\": 1}" --> indicates the object posted.
30
-
31
- to update an existing record:
32
- data = {record_id: 3, name: 'this is a test to update', field_2: Date.today}
33
- 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
34
-
35
26
  }
36
27
  spec.homepage = ""
37
28
  spec.license = "MIT"
@@ -1,3 +1,3 @@
1
1
  class RedcapAPI
2
- VERSION = "0.0.5b"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RedcapAPI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5b
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - eugyev
@@ -59,13 +59,7 @@ description: ! "\n This gem is still under active development. Please contact
59
59
  if specified\n \n r.get_fields # returns all fields for that instrument\n \n
60
60
  \ r.post(data) # this will either update an old record or create a new one. the
61
61
  data should be in form of array of hashes or as a hash (for one item). dates are
62
- accepted in Date class or in strftime('%F') format. \n for example\n data =
63
- {name: 'this is a test', field_2: Date.today}\n r.post(data) # creates a new
64
- object using the fields above. field names must match those in the existing project\n
65
- \ \"{\\\"count\\\": 1}\" --> indicates the object posted. \n \n to update an
66
- existing record:\n data = {record_id: 3, name: 'this is a test to update', field_2:
67
- Date.today}\n r.post(data) # this will update the record with record_id 3. if record_id
68
- 3 does not exist it will create an entry with that record id\n \n "
62
+ accepted in Date class or in strftime('%F') format. \n "
69
63
  email:
70
64
  - eugyev@gmail.com
71
65
  executables: []
@@ -95,9 +89,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
89
  version: '0'
96
90
  required_rubygems_version: !ruby/object:Gem::Requirement
97
91
  requirements:
98
- - - ! '>'
92
+ - - ! '>='
99
93
  - !ruby/object:Gem::Version
100
- version: 1.3.1
94
+ version: '0'
101
95
  requirements: []
102
96
  rubyforge_project:
103
97
  rubygems_version: 2.2.2