isurvey 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +5 -1
- data/lib/isurvey/api.rb +8 -6
- data/lib/isurvey/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjNiZTZlNDgwMWYyNjBlZjJhYTBiMGQ2YTBjOWIwMTdhNTkxZjU5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjQzMGQ2ZmQyNTcyZmNiYjZiMmM2OGFjOWRiOWFmNTg1N2UyNTI3Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjExZWY3ZDZkZmQ3MmMyOWM2NTAwNjQ2YzQ5MjBiYjJlNDgyYjg0MTQ3MmI4
|
10
|
+
YWQ3MzJiYTQ0MjMwNDAwOGNmZTgwYThjNmIzYTg1MWE1YjVhNjU5MTNjNzYz
|
11
|
+
OTYyNzRkYTliNGI4ZGJjYWI3MTM0OGJkZjUyNjRmNzdlMjc2ZDE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTg3NTQ2NGJmMzFmZWJmMTA0MWM3MWU0NDJjZTYzYjVkM2Q3NGU5OTQxN2Y4
|
14
|
+
YWRjM2VkOTEwYWUxYTg1Y2RjNWY0OTQ4Yzg0ZjY0MjM1N2E3YzNlNjVhOTA2
|
15
|
+
ODIxNzE2MzVjYTM5YWM2MjI2MmEzMmFmZTE1ZjMwYjRkZGZmZjI=
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ Before being used, the API must be loaded. This can be done in your application
|
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
30
|
-
There are questions and
|
30
|
+
There are questions, answers, and results. Questions are available through Isurvey::Question, answers are available through Isurvey::Answer, and results are available through Isurvey::Result. It may help to mention that results own answers.
|
31
31
|
|
32
32
|
To get a list of all questions:
|
33
33
|
|
@@ -37,6 +37,10 @@ To get a list of all answers:
|
|
37
37
|
|
38
38
|
Isurvey::Answer.all
|
39
39
|
|
40
|
+
To get a list of all results:
|
41
|
+
|
42
|
+
Isurvey::Result.all
|
43
|
+
|
40
44
|
All of the properties available through the iSurvey API are also available through the gem. You obtain a property value by calling for it on the appropriate class; for example, Isurvey::Answer.first.screen_id would give you the screen_id of the first Answer.
|
41
45
|
|
42
46
|
For questions, the available properties are:
|
data/lib/isurvey/api.rb
CHANGED
@@ -27,12 +27,14 @@ module Isurvey
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.answers
|
30
|
-
@answers
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
unless @answers
|
31
|
+
@answers = []
|
32
|
+
survey_results.each do |result|
|
33
|
+
result[:screen_results][:result].each do |answer|
|
34
|
+
answer = Answer.new(hash: answer)
|
35
|
+
answer.result_id = result[:result_id]
|
36
|
+
@answers << answer
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
@answers
|
data/lib/isurvey/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isurvey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Nipper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|