ecoportal-api-oozes 0.7.0 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -1
  3. data/README.md +2 -0
  4. data/ecoportal-api-oozes.gemspec +13 -6
  5. data/lib/ecoportal/api/common/content/class_helpers.rb +35 -0
  6. data/lib/ecoportal/api/common/content/collection_model.rb +25 -3
  7. data/lib/ecoportal/api/common/content/double_model.rb +27 -12
  8. data/lib/ecoportal/api/common/content/hash_diff_patch.rb +8 -2
  9. data/lib/ecoportal/api/common/content/wrapped_response.rb +1 -1
  10. data/lib/ecoportal/api/v2.rb +38 -3
  11. data/lib/ecoportal/api/v2/page.rb +3 -3
  12. data/lib/ecoportal/api/v2/page/component.rb +24 -7
  13. data/lib/ecoportal/api/v2/page/component/action.rb +14 -3
  14. data/lib/ecoportal/api/v2/page/component/action_field.rb +40 -2
  15. data/lib/ecoportal/api/v2/page/component/chart_field.rb +54 -0
  16. data/lib/ecoportal/api/v2/page/component/chart_field/frequency.rb +29 -0
  17. data/lib/ecoportal/api/v2/page/component/chart_field/heatmap.rb +27 -0
  18. data/lib/ecoportal/api/v2/page/component/chart_field/indicator.rb +26 -0
  19. data/lib/ecoportal/api/v2/page/component/chart_field/multiseries.rb +31 -0
  20. data/lib/ecoportal/api/v2/page/component/chart_field/sankey.rb +27 -0
  21. data/lib/ecoportal/api/v2/page/component/chart_field/serie.rb +26 -0
  22. data/lib/ecoportal/api/v2/page/component/chart_field/series_config.rb +23 -0
  23. data/lib/ecoportal/api/v2/page/component/chart_fr_field.rb +32 -0
  24. data/lib/ecoportal/api/v2/page/component/checklist_field.rb +35 -2
  25. data/lib/ecoportal/api/v2/page/component/checklist_item.rb +10 -0
  26. data/lib/ecoportal/api/v2/page/component/date_field.rb +21 -0
  27. data/lib/ecoportal/api/v2/page/component/files_field.rb +1 -2
  28. data/lib/ecoportal/api/v2/page/component/gauge_field.rb +24 -1
  29. data/lib/ecoportal/api/v2/page/component/gauge_stop.rb +88 -0
  30. data/lib/ecoportal/api/v2/page/component/images_field.rb +11 -2
  31. data/lib/ecoportal/api/v2/page/component/people_field.rb +8 -1
  32. data/lib/ecoportal/api/v2/page/component/plain_text_field.rb +2 -0
  33. data/lib/ecoportal/api/v2/page/component/reference_field.rb +4 -0
  34. data/lib/ecoportal/api/v2/page/component/selection_field.rb +4 -5
  35. data/lib/ecoportal/api/v2/page/component/selection_option.rb +1 -0
  36. data/lib/ecoportal/api/v2/page/component/signature_field.rb +12 -1
  37. data/lib/ecoportal/api/v2/page/component/tag_field.rb +2 -0
  38. data/lib/ecoportal/api/v2/page/components.rb +2 -2
  39. data/lib/ecoportal/api/v2/page/section.rb +1 -0
  40. data/lib/ecoportal/api/v2/page/sections.rb +1 -1
  41. data/lib/ecoportal/api/v2/page/stages.rb +6 -0
  42. data/lib/ecoportal/api/v2/pages.rb +17 -15
  43. data/lib/ecoportal/api/v2/pages/page_stage.rb +6 -1
  44. data/lib/ecoportal/api/v2/pages/stages.rb +4 -1
  45. data/lib/ecoportal/api/v2/people.rb +31 -0
  46. data/lib/ecoportal/api/v2/registers.rb +60 -6
  47. data/lib/ecoportal/api/v2/registers/page_result.rb +21 -0
  48. data/lib/ecoportal/api/v2/registers/register.rb +37 -0
  49. data/lib/ecoportal/api/v2/registers/stage_result.rb +14 -0
  50. data/lib/ecoportal/api/v2/registers/stages_result.rb +13 -0
  51. data/lib/ecoportal/api/v2/registers/template.rb +12 -0
  52. data/lib/ecoportal/api/v2/version.rb +1 -1
  53. metadata +70 -36
  54. data/lib/ecoportal/api/v2/register.rb +0 -36
  55. data/lib/ecoportal/api/v2/template.rb +0 -10
@@ -1,36 +0,0 @@
1
- module Ecoportal
2
- module API
3
- class V2
4
- class Register < Common::Content::DoubleModel
5
- passkey :id
6
- passthrough :name
7
-
8
- class_resolver :template_class, "Ecoportal::API::V2::Template"
9
-
10
- def templates_by_id
11
- @templates_by_id or index_templates
12
- @templates_by_id
13
- end
14
-
15
- def [](id)
16
- templates_by_id[id]
17
- end
18
-
19
- def templates
20
- templates_by_id.values
21
- end
22
-
23
- def index_templates
24
- @templates_by_id = {}
25
- doc["templates"].each do |template_doc|
26
- template = template_class.new(template_doc)
27
- @templates_by_id[template.id] = template
28
- end
29
- end
30
-
31
- end
32
- end
33
- end
34
- end
35
-
36
- require 'ecoportal/api/v2/template'
@@ -1,10 +0,0 @@
1
- module Ecoportal
2
- module API
3
- class V2
4
- class Template < Common::Content::DoubleModel
5
- passkey :id
6
- passthrough :name
7
- end
8
- end
9
- end
10
- end