dalia_api_survey_platform 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +18 -0
  7. data/Rakefile +11 -0
  8. data/dalia_api_survey_platform.gemspec +28 -0
  9. data/etc/fake_responses/create_query.json +23 -0
  10. data/etc/fake_responses/fetch_completion.json +17 -0
  11. data/etc/fake_responses/fetch_completions.csv +8 -0
  12. data/etc/fake_responses/fetch_completions.json +49 -0
  13. data/etc/fake_responses/fetch_survey.json +65 -0
  14. data/etc/fake_responses/fetch_survey_price.json +115 -0
  15. data/etc/fake_responses/fetch_surveys.json +56 -0
  16. data/etc/fake_responses/send_survey.json +24 -0
  17. data/etc/fake_responses/update_survey.json +23 -0
  18. data/lib/dalia_api_survey_platform.rb +15 -0
  19. data/lib/dalia_api_survey_platform/client.rb +136 -0
  20. data/lib/dalia_api_survey_platform/exception.rb +2 -0
  21. data/lib/dalia_api_survey_platform/http_client.rb +4 -0
  22. data/lib/dalia_api_survey_platform/json_extension.rb +5 -0
  23. data/lib/dalia_api_survey_platform/log.rb +41 -0
  24. data/lib/dalia_api_survey_platform/mock_client.rb +79 -0
  25. data/lib/dalia_api_survey_platform/version.rb +7 -0
  26. data/test/client_test.rb +138 -0
  27. data/test/fixtures/fake_responses/create_query.json +23 -0
  28. data/test/fixtures/fake_responses/fetch_completion.json +10 -0
  29. data/test/fixtures/fake_responses/fetch_completions.csv +8 -0
  30. data/test/fixtures/fake_responses/fetch_completions.json +28 -0
  31. data/test/fixtures/fake_responses/fetch_survey.json +64 -0
  32. data/test/fixtures/fake_responses/fetch_survey_price.json +115 -0
  33. data/test/fixtures/fake_responses/fetch_surveys.json +56 -0
  34. data/test/fixtures/fake_responses/send_survey.json +23 -0
  35. data/test/mock_client_test.rb +63 -0
  36. data/test/test_helper.rb +11 -0
  37. metadata +174 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3069c461ec76b96c0d4bf3bceea3c35ab55c72ca
4
+ data.tar.gz: ab9d89a211bc3ee13e8a536bfac438d7a4943719
5
+ SHA512:
6
+ metadata.gz: 66e2ab6544f11778c12c8d434595a506de8f111b38db7b955e2cc54c246fdea93252b82554828840fd1401ba26300fb9159539d9980dc22f7d1c4fc0d243e59e
7
+ data.tar.gz: 8062ee042c4a8c9ba4554e9849ee8805ddfbae4bbed47639a835ef53b17d1390a4715bb7ff59eec0cbd4d2d65f7dc25d466f0520256815cd51832af5b6de052d
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ etc/secret
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use --create ruby-1.9.2-p290@dalia_api_survey_platform
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dalia_api_survey_platform.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Fernando Guillen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,18 @@
1
+ # Dalia::Api::SurveyPlatform
2
+
3
+ # Gemfile
4
+ gem "dalia_api_survey_platform", :git => "https://github.com/DaliaResearch/DaliaApiSurveyPlatform.git"
5
+
6
+
7
+
8
+ # Ruby
9
+ client =
10
+ Dalia::Api::SurveyPlatform::Client.new({
11
+ :account_id => "PUBLISHER_UUID",
12
+ :api_host => "https://surveyplatform.daliaresearch.com",
13
+ :debug_mode => true
14
+ })
15
+
16
+ puts client.fetch_surveys
17
+
18
+
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require "rake/testtask"
4
+
5
+ task :default => :test
6
+
7
+ Rake::TestTask.new do |t|
8
+ t.libs << "."
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ t.verbose = true
11
+ end
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dalia_api_survey_platform/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "dalia_api_survey_platform"
8
+ spec.version = Dalia::Api::SurveyPlatform::VERSION
9
+ spec.authors = ["Fernando Guillen"]
10
+ spec.email = ["fguillen.mail@gmail.com"]
11
+ spec.description = "Ruby wrapper for the Dalia's API"
12
+ spec.summary = "Ruby wrapper for the Dalia's API"
13
+ spec.homepage = "https://github.com/DaliaResearch/DaliaApiSurveyPlatform"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "httparty"
22
+ spec.add_dependency "recursive-open-struct", "0.4.3"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "fakeweb"
27
+ spec.add_development_dependency "mocha"
28
+ end
@@ -0,0 +1,23 @@
1
+ {
2
+ "question_id": "Qb5faf2",
3
+ "question_title": "What is your immediate reaction to the advertisement?",
4
+ "question_kind": "multiple_sole",
5
+ "values": [
6
+ {
7
+ "value": "Rather boring",
8
+ "frequency": 9
9
+ },
10
+ {
11
+ "value": "Don’t know",
12
+ "frequency": 6
13
+ },
14
+ {
15
+ "value": "Somewhat confusing",
16
+ "frequency": 8
17
+ },
18
+ {
19
+ "value": "I found it interesting",
20
+ "frequency": 11
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "completion": {
3
+ "id": "C001",
4
+ "survey_id": "S002",
5
+ "panel_user_id": "PU001",
6
+ "state": "completed",
7
+ "prequalification_fail_at": null,
8
+ "completed_at": "2013-10-01 10:11:12",
9
+ "answers": [
10
+ {
11
+ "question_id": "Q1",
12
+ "question_title": "The question title",
13
+ "result": "The Result"
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ "[dem] annual_income","[dem] birth_year","[dem] city_name","[dem] city_name_2","[dem] country_code","[dem] country_code_2","[dem] device_kind","[dem] device_platform","[dem] device_version","[dem] education_level","[dem] gender","[dem] hispanic_background","[dem] household_income","[dem] ip","[dem] latitude","[dem] latitude_2","[dem] longitude","[dem] longitude_2","[dem] postal_code","[dem] postal_code_2","[dem] publisher_user_id","[dem] region_iso_code_2","[dem] region_name","[dem] region_name_2","[dem] traits","[dem] user_agent","[meta] Completed at","[meta] Created at","[meta] Duration","[meta] ID","[meta] PanelUser ID","[meta] PanelUser ID kind","[meta] Publisher ID","[meta] State","[meta] Survey ID","[question][CS00020][OPTION_ID]","[question][CS00020][VALUE]","[question][CS00130][OPTION_ID]","[question][CS00130][VALUE]","[question][CS00150][OPTION_ID]","[question][CS00150][VALUE]","[question][CS00240][OPTION_ID]","[question][CS00240][VALUE]","[question][CS00290][OPTION_ID]","[question][CS00290][VALUE]","[question][CS00310][OPTION_ID]","[question][CS00310][VALUE]","[question][CS00340][OPTION_ID]","[question][CS00340][VALUE]","[question][CS00360][OPTION_ID]","[question][CS00360][VALUE]","[question][CS00420][OPTION_ID]","[question][CS00420][VALUE]","[question][CS00440][OPTION_ID]","[question][CS00440][VALUE]","[question][CS00450][OPTION_ID]","[question][CS00450][VALUE]","[question][CS00470][OPTION_ID]","[question][CS00470][VALUE]","[question][CS00480][OPTION_ID]","[question][CS00480][VALUE]","[question][CS00490][OPTION_ID]","[question][CS00490][VALUE]","[question][CS00500][OPTION_ID]","[question][CS00500][VALUE]","[question][CS00505][OPTION_ID]","[question][CS00505][VALUE]","[question][CS00510][OPTION_ID]","[question][CS00510][VALUE]","[question][CS00520][OPTION_ID]","[question][CS00520][VALUE]","[question][CS00530][OPTION_ID]","[question][CS00530][VALUE]","[question][CS00540][OPTION_ID]","[question][CS00540][VALUE]","[question][CS00550][OPTION_ID]","[question][CS00550][VALUE]","[question][CS00600][OPTION_ID]","[question][CS00600][VALUE]","[question][CS00610][OPTION_ID]","[question][CS00610][VALUE]","[question][CS00620][OPTION_ID]","[question][CS00620][VALUE]","[question][CS00650][OPTION_ID]","[question][CS00650][VALUE]","[question][CS00700][OPTION_ID]","[question][CS00700][VALUE]","[question][CS00740][OPTION_ID]","[question][CS00740][VALUE]","[question][CS00760][OPTION_ID]","[question][CS00760][VALUE]","[question][CS00770][OPTION_ID]","[question][CS00770][VALUE]","[question][CS00780][OPTION_ID]","[question][CS00780][VALUE]","[question][CS00800][OPTION_ID]","[question][CS00800][VALUE]","[question][CS00805][OPTION_ID]","[question][CS00805][VALUE]","[question][CS00810][OPTION_ID]","[question][CS00810][VALUE]","[question][CS00820][OPTION_ID]","[question][CS00820][VALUE]","[question][CS00830][OPTION_ID]","[question][CS00830][VALUE]","[question][CS00850][OPTION_ID]","[question][CS00850][VALUE]","[question][CS00860][OPTION_ID]","[question][CS00860][VALUE]","[question][CS00940][OPTION_ID]","[question][CS00940][VALUE]","[question][CS00950][OPTION_ID]","[question][CS00950][VALUE]","[question][CS00960][OPTION_ID]","[question][CS00960][VALUE]","[question][CS00970][OPTION_ID]","[question][CS00970][VALUE]","[question][CS00980][OPTION_ID]","[question][CS00980][VALUE]","[question][CS00990][OPTION_ID]","[question][CS00990][VALUE]","[question][CS01000][OPTION_ID]","[question][CS01000][VALUE]","[question][CS01010][OPTION_ID]","[question][CS01010][VALUE]","[question][CS01020][OPTION_ID]","[question][CS01020][VALUE]","[question][CS01030][OPTION_ID]","[question][CS01030][VALUE]","[question][CS01040][OPTION_ID]","[question][CS01040][VALUE]","[question][CS01050][OPTION_ID]","[question][CS01050][VALUE]","[trap] car_owner","[trap] gender","[trap] has_children","[trap] is_attentive","[trap] total_score","[trap] younger_39"
2
+ "","","","","","","","","","","","","","","","","","","","","","","","","","","","2014-07-18 11:25:01","","281349","02ce9ec0-f09c-0131-be1e-0a81e8b09a82","PublisherPluginUser","2","pending","81","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
3
+ "very_high","1997","Red Bank","","US","","mobile","android","4","no","male","no","very_high","96.240.11.45","40.360299999999995","","-74.0728","","07701","","3","","New Jersey","","","Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; T-Mobile myTouch Build/HuaweiU8680) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1","2014-07-18 12:54:59","2014-07-18 12:50:51","248","281399","e83e76c0-f0a7-0131-bfc8-0a81e8b09a82","PublisherPluginUser","2","completed","81","O0050","There are more than four people in the household","O0050","more than $ 8801","O0030","No","O0010","I don’t have a formal education","O0010","It was very good","O0020","Yes, Qatar is the right place for the World Cup","O0010","Only physical books","O0030","More than 20","O0020","Between 3 and 5 minutes","","","O0010","I always answer all questions honestly in a survey","O0020 | O0090 | O0080","CNN | Twitter | Facebook","O0040","Disagree","O0010","""We need to innovate more, do things differently and embrace change now, even if this is difficult. I’m ready to make the effort.""","O0050","Strongly disagree","O0030","... institutional factors (for example, some countries have better laws and political and economic arrangements).","O0010","For the most part, YES.","O0010","For the most part, YES.","O0020","... a fairly positive effect on our way of life","O0050","Not at all important","O0010","Yes, I agree","O0010","Very favorable/positive","O0010","Very favorable/positive","O0010","Very favorable/positive","O0020","Laptop computer","O0040 | O0030 | O0060","Infectious diseases | Economic or financial crises | Organized crime","O0020 | O0030","Apps of cooking magazines | Communities/ Forums of cooking magazines","O0020","If a survey is short, interesting and meaningful, I would complete it without a reward","","it was gear","","","O0040 | O0010 | O0050 | O0070 | O0030","WWF | Unicef | Greenpeace | Red Cross / Red Crescent | Save the Children","O0040","WWF","O0040","TLC","O0030","Politics and diplomacy","O0010","BMW","O0040","I believe in God, and my belief in God influences my behavior somewhat","O0010 | O0110 | O0080 | O0060","Improving housing conditions | Improving work-life balance | Improving healthcare | Protecting the environment","Oyes","Yes","Ono","No","Ono","No","Ono","No","Ono","No","Ono","No","Oyes","Yes","Ono","No","Ono","No","Oyes","Yes","Ono","No","Ono","No","0","2","0","1","0","0"
4
+ "","1998","Chicago","","US","","mobile","android","4","low","female","yes","","66.87.76.249","41.849999999999994","","-87.65","","","","3","","Illinois","","","Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; SPH-L710 Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","2014-07-18 13:00:26","2014-07-18 12:53:29","417","281429","4c43ab90-f0a8-0131-bffe-0a81e8b09a82","PublisherPluginUser","2","completed","81","O0040","There are four of us in the household","O0060","I’d prefer not to answer this question","O0010","Yes","O0020","I have some high school or secondary school education","O0010","It was very good","O0010","No, Qatar is not the right place for the World Cup","O0010","Only physical books","O0040","None/does not apply","O0020","Between 3 and 5 minutes","","","O0010","I always answer all questions honestly in a survey","O0020 | O0030 | O0040","CNN | BBC News | New York Times","O0010","Strongly agree","O0010","""We need to innovate more, do things differently and embrace change now, even if this is difficult. I’m ready to make the effort.""","O0030","Undecided","O0020","... cultural factors (for example, some countries have a better work ethic).","O0010","For the most part, YES.","O0010","For the most part, YES.","O0010","... a very positive effect on our way of life","O0010","Extremely important","O0020","No, I don't agree","O0020","Somewhat favorable/positive","O0020","Somewhat favorable/positive","O0020","Somewhat favorable/positive","O0040","Mobile phone","O0010 | O0020 | O0070","Environmental degradation and climate change | International conflicts and wars | Poverty and malnutrition","O0040 | O0050","Cooking Books | TV Shows","O0030","I’m really interested about what other people answered to this survey","","i think it's perfect already","","","O0040 | O0050 | O0070 | O0030 | O0010","WWF | Greenpeace | Red Cross / Red Crescent | Save the Children | Unicef","O0040 | O0030 | O0050 | O0070","WWF | Save the Children | Greenpeace | Red Cross / Red Crescent","O0030 | O0020 | O0040 | O0010 | O0060 | O0050","History Channel | National Geographic Channel | TLC | Discovery Channel | NatGeo WILD | Animal Planet","O0050","I don't know very well what the European Union is or does.","O0050","Porsche","O0040","I believe in God, and my belief in God influences my behavior somewhat","O0090 | O0100 | O0050 | O0060","Increasing public happiness | Reducing crime | Improving education | Protecting the environment","Ono","No","Ono","No","Ono","No","Oyes","Yes","Ono","No","Ono","No","Oyes","Yes","Oyes","Yes","Oyes","Yes","Ono","No","Ono","No","Ono","No","0","2","0","1","0","0"
5
+ "medium_low","1973","Knoxville","","US","","mobile","android","4","medium","male","no","low","174.237.9.71","35.9606","","-83.9207","","","","3","","Tennessee","","","Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; LG-L38C Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 MMS/LG-Android-MMS-V1.0/1.2","2014-07-18 13:05:18","2014-07-18 12:54:36","642","281445","32778cc0-f0a8-0131-bfed-0a81e8b09a82","PublisherPluginUser","2","completed","81","O0050","There are more than four people in the household","O0020","$ 1701 - $ 3300","O0010","Yes","O0030","I completed high school or obtained an equivalent diploma","O0030","It was ok","O0030","I don't have a strong opinion on this.","O0060","I haven’t read any books","O0010","Less than 5","O0040","Between 8 and 12 minutes","","","O0020","I usually try to be as honest as possible in surveys","O0020 | O0030 | O0080","CNN | BBC News | Facebook","O0020","Agree","O0010","""We need to innovate more, do things differently and embrace change now, even if this is difficult. I’m ready to make the effort.""","O0020","Agree","O0030 | O0040","... institutional factors (for example, some countries have better laws and political and economic arrangements). | ... leadership (for example, some countries have smarter, more enlightened or more honest leaders).","O0010","For the most part, YES.","O0020","For the most part, NO.","O0050","... a very negative effect on our way of life","O0030","Moderately important","O0020","No, I don't agree","O0030","Somewhat unfavorable/negative","O0020","Somewhat favorable/positive","O0030","Somewhat unfavorable/negative","O0040","Mobile phone","O0020 | O0050 | O0080","International conflicts and wars | Terrorism | Weapons of mass destruction","O0070","None of these","O0020","If a survey is short, interesting and meaningful, I would complete it without a reward","","shorter","","","O0010 | O0050 | O0070","Unicef | Greenpeace | Red Cross / Red Crescent","O0070 | O0050","Red Cross / Red Crescent | Greenpeace","O0020 | O0060 | O0040 | O0030 | O0050 | O0010","National Geographic Channel | NatGeo WILD | TLC | History Channel | Animal Planet | Discovery Channel","O0030","Politics and diplomacy","O0020","Mercedes-Benz","O0060","I would rather not answer this question.","O0020 | O0030 | O0070 | O0050","Increasing household income | Reducing unemployment | Improving politics | Improving education","Oyes","Yes","Oyes","Yes","Ono","No","Oyes","Yes","Ono","No","Ono","No","Ono","No","Oyes","Yes","Ono","No","Ono","No","Oyes","Yes","Ono","No","0","2","0","1","0","1"
6
+ "","1994","Pittsburgh","","US","","mobile","iphone","7","medium","female","no","","71.126.43.26","40.44059999999999","","-79.9959","","","","3","","Pennsylvania","","","Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53","2014-07-18 13:11:35","2014-07-18 13:04:38","417","281530","b81156f0-f0a9-0131-c0d4-0a81e8b09a82","PublisherPluginUser","2","completed","81","O0010","I live alone","O0060","I’d prefer not to answer this question","O0020","Maybe","O0030","I completed high school or obtained an equivalent diploma","O0030","It was ok","O0010","No, Qatar is not the right place for the World Cup","O0040","Mostly eBooks","O0020","Between 5 and 20","O0070","Don't know","","","O0020","I usually try to be as honest as possible in surveys","O0090 | O0060 | O0020","Twitter | Yahoo News | CNN","O0030","Undecided","O0020","""Changes are for the next generation and for future jobs. I'm personally NOT ready to make an effort now.""","O0030","Undecided","O0030","... institutional factors (for example, some countries have better laws and political and economic arrangements).","O0020","For the most part, NO.","O0030","There will not be much change.","O0030","... no effect on our way of life","O0020","Very important","O0020","No, I don't agree","O0020","Somewhat favorable/positive","O0010","Very favorable/positive","O0040","Very unfavorable/negative","O0020","Laptop computer","O0030 | O0080 | O0020","Economic or financial crises | Weapons of mass destruction | International conflicts and wars","O0060","Other","O0020","If a survey is short, interesting and meaningful, I would complete it without a reward","","It needs to be a tad shorter","","","O0030","Save the Children","O0010","Unicef","O0040","TLC","O0060","None of the above.","O0030","Volkswagen","O0060","I would rather not answer this question.","O0010 | O0070 | O0100 | O0090","Improving housing conditions | Improving politics | Reducing crime | Increasing public happiness","Ono","No","Ono","No","Oyes","Yes","Ono","No","Ono","No","Ono","No","Ono","No","Ono","No","Ono","No","Ono","No","Ono","No","Ono","No","0","2","0","1","0","0"
7
+ "","","","","","","","","","","","","","","","","","","","","","","","","","","","2014-07-18 13:04:49","","281531","bdfdc980-f0a9-0131-c0da-0a81e8b09a82","PublisherPluginUser","2","pending","81","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
8
+ "medium_low","1952","Van Buren","","US","","mobile","android","4","high","female","no","low","184.180.251.47","35.483000000000004","","-94.3469","","72956","","3","","Arkansas","","","Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; Z750C Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","2014-07-18 13:29:29","2014-07-18 13:08:48","1241","281579","3c743350-f0aa-0131-c128-0a81e8b09a82","PublisherPluginUser","2","completed","81","O0030","There are three of us in the household","O0020","$ 1701 - $ 3300","O0030","No","O0040","I have completed a university or equivalent degree","O0020","It was good","O0030","I don't have a strong opinion on this.","O0040","Mostly eBooks","O0040","None/does not apply","O0040","Between 8 and 12 minutes","","","O0020","I usually try to be as honest as possible in surveys","O0050 | O0020 | O0060","Huffington Post | CNN | Yahoo News","O0020","Agree","O0010","""We need to innovate more, do things differently and embrace change now, even if this is difficult. I’m ready to make the effort.""","O0020","Agree","O0030","... institutional factors (for example, some countries have better laws and political and economic arrangements).","O0010","For the most part, YES.","O0010","For the most part, YES.","O0010","... a very positive effect on our way of life","O0020","Very important","O0020","No, I don't agree","O0010","Very favorable/positive","O0020","Somewhat favorable/positive","O0030","Somewhat unfavorable/negative","O0010","Desktop computer","O0010 | O0020 | O0050","Environmental degradation and climate change | International conflicts and wars | Terrorism","O0060","Other","O0060","I am a human and I'm currently doing a survey","","it was different from other surveys and i enjoyed it. just because it made me think about my answers.","","","O0010 | O0030 | O0050 | O0060 | O0070","Unicef | Save the Children | Greenpeace | Amnesty International | Red Cross / Red Crescent","O0030 | O0010 | O0050","Save the Children | Unicef | Greenpeace","O0010 | O0030 | O0050","Discovery Channel | History Channel | Animal Planet","O0050","I don't know very well what the European Union is or does.","O0020","Mercedes-Benz","O0050","I believe in God, and my belief in God influences my behavior very much","O0060 | O0050 | O0080 | O0030","Protecting the environment | Improving education | Improving healthcare | Reducing unemployment","Ono","No","Oyes","Yes","Ono","No","Oyes","Yes","Ono","No","Ono","No","Ono","No","Ono","No","Oyes","Yes","Ono","No","Ono","No","Ono","No","0","2","0","1","0","1"
@@ -0,0 +1,49 @@
1
+ {
2
+ "completions": [
3
+ {
4
+ "id": "C001",
5
+ "survey_id": "S002",
6
+ "panel_user_id": "PU001",
7
+ "state": "completed",
8
+ "prequalification_fail_at": null,
9
+ "completed_at": "2013-10-01 10:11:12",
10
+ "answers": [
11
+ {
12
+ "question_id": "Q1",
13
+ "question_title": "The question title",
14
+ "result": "The Result"
15
+ }
16
+ ]
17
+ },
18
+ {
19
+ "id": "C002",
20
+ "survey_id": "S002",
21
+ "panel_user_id": "PU001",
22
+ "state": "completed",
23
+ "prequalification_fail_at": null,
24
+ "completed_at": "2013-10-01 10:11:12",
25
+ "answers": [
26
+ {
27
+ "question_id": "Q1",
28
+ "question_title": "The question title",
29
+ "result": "The Result"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "id": "C003",
35
+ "survey_id": "S002",
36
+ "panel_user_id": "PU001",
37
+ "state": "completed",
38
+ "prequalification_fail_at": null,
39
+ "completed_at": "2013-10-01 10:11:12",
40
+ "answers": [
41
+ {
42
+ "question_id": "Q1",
43
+ "question_title": "The question title",
44
+ "result": "The Result"
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "devive_id": "XXX1",
3
+ "survey": {
4
+ "id": "001",
5
+ "title": "The survey 001",
6
+ "tagline": "This is the tagline",
7
+ "kind": "mr_survey",
8
+ "published": false,
9
+ "cap_completions": 10,
10
+ "credits": {
11
+ "kind": "stars",
12
+ "amount": "10"
13
+ },
14
+ "questions": [
15
+ {
16
+ "id": "Q32d04b",
17
+ "kind": "multiple_sole",
18
+ "title": "Fill the question",
19
+ "body": {
20
+ "options": [
21
+ {
22
+ "text": "New option 1",
23
+ "branch_to": "Qb006c2"
24
+ },
25
+ {
26
+ "text": "New option 2",
27
+ "branch_to": ""
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ "id": "Qc8e3a0",
34
+ "kind": "multiple",
35
+ "title": "Fill the question",
36
+ "body": {
37
+ "options": [
38
+ {
39
+ "text": "New option 1"
40
+ },
41
+ {
42
+ "text": "New option 2"
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ {
48
+ "id": "Qb006c2",
49
+ "kind": "range",
50
+ "title": "Fill the question",
51
+ "body": {
52
+ "min": "0",
53
+ "max": "100"
54
+ }
55
+ },
56
+ {
57
+ "id": "Qa01e47",
58
+ "kind": "page",
59
+ "body": {
60
+ "page": "This is the **presentation** page. \n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. "
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "account_id": "RESEARCHER_ACCOUNT_ID",
3
+ "survey": {
4
+ "id": null,
5
+ "title": "Ad Test",
6
+ "tagline": "Check the video and describe your experience",
7
+ "prequalification": "",
8
+ "kind": "media_test",
9
+ "published": true,
10
+ "cap_completions": 10,
11
+ "demographics": [
12
+ {
13
+ "key": "gender",
14
+ "value": [
15
+ "male"
16
+ ]
17
+ }
18
+ ],
19
+ "credits": {
20
+ "kind": "stars",
21
+ "amount": "220.0"
22
+ },
23
+ "questions": [
24
+ {
25
+ "id": "Qa828f7",
26
+ "kind": "page",
27
+ "body": {
28
+ "page": "The following page displays an **advertisement** for few minutes. \n\nYou will be asked to answer questions on that advertisement later on."
29
+ }
30
+ },
31
+ {
32
+ "id": "Qbc8435",
33
+ "kind": "page",
34
+ "body": {
35
+ "page": "Please watch the video **until the end**\n\n<iframe width=\"420\" height=\"315\" src=\"//www.youtube.com/embed/6tCtM8UEQv8\" frameborder=\"0\" allowfullscreen></iframe>"
36
+ }
37
+ },
38
+ {
39
+ "id": "Qb5faf2",
40
+ "kind": "multiple_sole",
41
+ "title": "What is your immediate reaction to the advertisement?",
42
+ "demographic_key": "gender",
43
+ "body": {
44
+ "options": [
45
+ {
46
+ "text": "I found it interesting",
47
+ "demographic_value": "male"
48
+ },
49
+ {
50
+ "text": "Somewhat confusing",
51
+ "demographic_value": "female"
52
+ },
53
+ {
54
+ "text": "Rather boring",
55
+ "demographic_value": "trans"
56
+ },
57
+ {
58
+ "text": "Don’t know",
59
+ "demographic_value": "other"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "id": "Q9df425",
66
+ "kind": "multiple_sole",
67
+ "title": "Which product does the advertisement try to sell?",
68
+ "body": {
69
+ "options": [
70
+ {
71
+ "text": "A movie"
72
+ },
73
+ {
74
+ "text": "A car"
75
+ },
76
+ {
77
+ "text": "A cheese"
78
+ },
79
+ {
80
+ "text": "Don’t know"
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ {
86
+ "id": "Qe776d4",
87
+ "kind": "multiple_sole",
88
+ "title": "Do you know the company that created this ad?",
89
+ "body": {
90
+ "options": [
91
+ {
92
+ "text": "Yes"
93
+ },
94
+ {
95
+ "text": "Not sure"
96
+ },
97
+ {
98
+ "text": "No"
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ ]
104
+ },
105
+ "price": {
106
+ "survey_questions": 5,
107
+ "survey_demographics": 1,
108
+ "price_by_question": 0.1,
109
+ "price_by_demographic": 0.5,
110
+ "total_price_by_questions": 0.5,
111
+ "total_price_by_demographics": 0.5,
112
+ "total": 1.0,
113
+ "panel_users_count": 1
114
+ }
115
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "account_id": "422c9c50-59e2-0131-785c-0a424708edaa",
3
+ "surveys": [
4
+ {
5
+ "id": 17,
6
+ "uuid": "UUID_1",
7
+ "title": "The survey 001",
8
+ "tagline": "This is an explanation of the survey",
9
+ "prequalification": null,
10
+ "kind": "mr_survey",
11
+ "published": true,
12
+ "body": {
13
+ "screens": [
14
+ {
15
+ "id": "S00010",
16
+ "questions": []
17
+ }
18
+ ]
19
+ }
20
+ },
21
+ {
22
+ "id": 18,
23
+ "uuid": "UUID_2",
24
+ "title": "The survey 002",
25
+ "tagline": "This is an explanation of the survey",
26
+ "prequalification": null,
27
+ "kind": "mr_survey",
28
+ "published": true,
29
+ "body": {
30
+ "screens": [
31
+ {
32
+ "id": "S00011",
33
+ "questions": []
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ {
39
+ "id": 19,
40
+ "uuid": "UUID_3",
41
+ "title": "The survey 003",
42
+ "tagline": "This is an explanation of the survey",
43
+ "prequalification": null,
44
+ "kind": "mr_survey",
45
+ "published": true,
46
+ "body": {
47
+ "screens": [
48
+ {
49
+ "id": "S00012",
50
+ "questions": []
51
+ }
52
+ ]
53
+ }
54
+ }
55
+ ]
56
+ }