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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTViOTQwNTM2ZWMyMDE2MzRlMzJiYTAyMGE5MDQzYzQ0NGIwM2U2Mw==
4
+ NjNiZTZlNDgwMWYyNjBlZjJhYTBiMGQ2YTBjOWIwMTdhNTkxZjU5Yg==
5
5
  data.tar.gz: !binary |-
6
- MjIzMTdkMDc2ZTZmYjRkNGViMmJlMmZlNDFjNGZjY2ZhOWEyODhjNw==
6
+ ZjQzMGQ2ZmQyNTcyZmNiYjZiMmM2OGFjOWRiOWFmNTg1N2UyNTI3Yg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MjAwMzAwNTY3YzQwMTNmZDA2YmE2YWJmNzZmYTBmMjUxNDJlYWIwOTdjM2Jl
10
- Njg3N2E0YzNkN2JiMWI5NjBiMjNkOWVkM2ZkYjg3MmQ0MjFkZWRjYjhlY2U5
11
- ZmU4OWRiZDE4OWVkNGI3YTNiNjAyNDkwODNiYWMwNWNmZWExZGI=
9
+ ZjExZWY3ZDZkZmQ3MmMyOWM2NTAwNjQ2YzQ5MjBiYjJlNDgyYjg0MTQ3MmI4
10
+ YWQ3MzJiYTQ0MjMwNDAwOGNmZTgwYThjNmIzYTg1MWE1YjVhNjU5MTNjNzYz
11
+ OTYyNzRkYTliNGI4ZGJjYWI3MTM0OGJkZjUyNjRmNzdlMjc2ZDE=
12
12
  data.tar.gz: !binary |-
13
- OTgyMDJlZmM3ZWQ4YmU3NjgwMWVjZTk5MGQxMTY0YThlZmFhZTVlZjNkMzE1
14
- ODVhNzdhZGIzNjVmNjRmZmM5NWQwMTQzZTc2OWEyNGY2Y2RhNDFjNmE1NTEy
15
- OWY0NTg1MjM2ZDA0YjBhYzc4MzBhNGM5ZDQxYTY4NDZjMWQ2YTQ=
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 answers. Questions are available through Isurvey::Question and answers are available through Isurvey::Answer.
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
- survey_results.each do |result|
32
- result[:screen_results][:result].each do |answer|
33
- answer = Answer.new(hash: answer)
34
- answer.result_id = result[:result_id]
35
- @answers << answer
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
@@ -1,3 +1,3 @@
1
1
  module Isurvey
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-10 00:00:00.000000000 Z
11
+ date: 2013-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon