d4h_api 2.0.0

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.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/LICENSE.md +136 -0
  4. data/README.md +785 -0
  5. data/d4h_api.gemspec +28 -0
  6. data/lib/d4h/api/client.rb +216 -0
  7. data/lib/d4h/api/collection.rb +55 -0
  8. data/lib/d4h/api/error.rb +31 -0
  9. data/lib/d4h/api/model.rb +57 -0
  10. data/lib/d4h/api/models/animal.rb +8 -0
  11. data/lib/d4h/api/models/animal_group.rb +8 -0
  12. data/lib/d4h/api/models/animal_group_membership.rb +8 -0
  13. data/lib/d4h/api/models/animal_qualification.rb +8 -0
  14. data/lib/d4h/api/models/attendance.rb +8 -0
  15. data/lib/d4h/api/models/custom_field.rb +8 -0
  16. data/lib/d4h/api/models/custom_field_for_entity.rb +8 -0
  17. data/lib/d4h/api/models/customer_identifier.rb +8 -0
  18. data/lib/d4h/api/models/d4h_module.rb +8 -0
  19. data/lib/d4h/api/models/d4h_task.rb +8 -0
  20. data/lib/d4h/api/models/document.rb +8 -0
  21. data/lib/d4h/api/models/duty.rb +8 -0
  22. data/lib/d4h/api/models/equipment.rb +8 -0
  23. data/lib/d4h/api/models/equipment_brand.rb +8 -0
  24. data/lib/d4h/api/models/equipment_category.rb +8 -0
  25. data/lib/d4h/api/models/equipment_fund.rb +8 -0
  26. data/lib/d4h/api/models/equipment_inspection.rb +8 -0
  27. data/lib/d4h/api/models/equipment_inspection_result.rb +8 -0
  28. data/lib/d4h/api/models/equipment_inspection_step.rb +8 -0
  29. data/lib/d4h/api/models/equipment_inspection_step_result.rb +8 -0
  30. data/lib/d4h/api/models/equipment_kind.rb +8 -0
  31. data/lib/d4h/api/models/equipment_location.rb +8 -0
  32. data/lib/d4h/api/models/equipment_model.rb +8 -0
  33. data/lib/d4h/api/models/equipment_retired_reason.rb +8 -0
  34. data/lib/d4h/api/models/equipment_supplier.rb +8 -0
  35. data/lib/d4h/api/models/equipment_supplier_ref.rb +8 -0
  36. data/lib/d4h/api/models/equipment_usage.rb +8 -0
  37. data/lib/d4h/api/models/event.rb +8 -0
  38. data/lib/d4h/api/models/exercise.rb +8 -0
  39. data/lib/d4h/api/models/handler_group.rb +8 -0
  40. data/lib/d4h/api/models/handler_group_membership.rb +8 -0
  41. data/lib/d4h/api/models/handler_qualification.rb +8 -0
  42. data/lib/d4h/api/models/health_safety_category.rb +8 -0
  43. data/lib/d4h/api/models/health_safety_report.rb +8 -0
  44. data/lib/d4h/api/models/health_safety_severity.rb +8 -0
  45. data/lib/d4h/api/models/incident.rb +8 -0
  46. data/lib/d4h/api/models/incident_involved_injury.rb +8 -0
  47. data/lib/d4h/api/models/incident_involved_metadata.rb +8 -0
  48. data/lib/d4h/api/models/incident_involved_person.rb +8 -0
  49. data/lib/d4h/api/models/location_bookmark.rb +8 -0
  50. data/lib/d4h/api/models/member.rb +8 -0
  51. data/lib/d4h/api/models/member_custom_status.rb +8 -0
  52. data/lib/d4h/api/models/member_group.rb +8 -0
  53. data/lib/d4h/api/models/member_group_membership.rb +8 -0
  54. data/lib/d4h/api/models/member_qualification.rb +8 -0
  55. data/lib/d4h/api/models/member_qualification_award.rb +8 -0
  56. data/lib/d4h/api/models/member_retired_reason.rb +8 -0
  57. data/lib/d4h/api/models/organisation.rb +8 -0
  58. data/lib/d4h/api/models/repair.rb +8 -0
  59. data/lib/d4h/api/models/resource_bundle.rb +8 -0
  60. data/lib/d4h/api/models/role.rb +8 -0
  61. data/lib/d4h/api/models/search_result.rb +8 -0
  62. data/lib/d4h/api/models/tag.rb +8 -0
  63. data/lib/d4h/api/models/team.rb +8 -0
  64. data/lib/d4h/api/models/whiteboard.rb +8 -0
  65. data/lib/d4h/api/models/whoami.rb +8 -0
  66. data/lib/d4h/api/resource.rb +171 -0
  67. data/lib/d4h/api/resources/animal_group_membership_resource.rb +21 -0
  68. data/lib/d4h/api/resources/animal_group_resource.rb +33 -0
  69. data/lib/d4h/api/resources/animal_qualification_resource.rb +21 -0
  70. data/lib/d4h/api/resources/animal_resource.rb +21 -0
  71. data/lib/d4h/api/resources/attendance_resource.rb +25 -0
  72. data/lib/d4h/api/resources/custom_field_for_entity_resource.rb +17 -0
  73. data/lib/d4h/api/resources/custom_field_resource.rb +33 -0
  74. data/lib/d4h/api/resources/customer_identifier_resource.rb +17 -0
  75. data/lib/d4h/api/resources/d4h_module_resource.rb +17 -0
  76. data/lib/d4h/api/resources/d4h_task_resource.rb +17 -0
  77. data/lib/d4h/api/resources/document_resource.rb +33 -0
  78. data/lib/d4h/api/resources/duty_resource.rb +21 -0
  79. data/lib/d4h/api/resources/equipment_brand_resource.rb +33 -0
  80. data/lib/d4h/api/resources/equipment_category_resource.rb +33 -0
  81. data/lib/d4h/api/resources/equipment_fund_resource.rb +33 -0
  82. data/lib/d4h/api/resources/equipment_inspection_resource.rb +21 -0
  83. data/lib/d4h/api/resources/equipment_inspection_result_resource.rb +29 -0
  84. data/lib/d4h/api/resources/equipment_inspection_step_resource.rb +33 -0
  85. data/lib/d4h/api/resources/equipment_inspection_step_result_resource.rb +33 -0
  86. data/lib/d4h/api/resources/equipment_kind_resource.rb +33 -0
  87. data/lib/d4h/api/resources/equipment_location_resource.rb +21 -0
  88. data/lib/d4h/api/resources/equipment_model_resource.rb +33 -0
  89. data/lib/d4h/api/resources/equipment_resource.rb +33 -0
  90. data/lib/d4h/api/resources/equipment_retired_reason_resource.rb +33 -0
  91. data/lib/d4h/api/resources/equipment_supplier_ref_resource.rb +33 -0
  92. data/lib/d4h/api/resources/equipment_supplier_resource.rb +33 -0
  93. data/lib/d4h/api/resources/equipment_usage_resource.rb +33 -0
  94. data/lib/d4h/api/resources/event_resource.rb +29 -0
  95. data/lib/d4h/api/resources/exercise_resource.rb +33 -0
  96. data/lib/d4h/api/resources/handler_group_membership_resource.rb +21 -0
  97. data/lib/d4h/api/resources/handler_group_resource.rb +33 -0
  98. data/lib/d4h/api/resources/handler_qualification_resource.rb +21 -0
  99. data/lib/d4h/api/resources/health_safety_category_resource.rb +33 -0
  100. data/lib/d4h/api/resources/health_safety_report_resource.rb +21 -0
  101. data/lib/d4h/api/resources/health_safety_severity_resource.rb +33 -0
  102. data/lib/d4h/api/resources/incident_involved_injury_resource.rb +21 -0
  103. data/lib/d4h/api/resources/incident_involved_metadata_resource.rb +17 -0
  104. data/lib/d4h/api/resources/incident_involved_person_resource.rb +21 -0
  105. data/lib/d4h/api/resources/incident_resource.rb +29 -0
  106. data/lib/d4h/api/resources/location_bookmark_resource.rb +21 -0
  107. data/lib/d4h/api/resources/member_custom_status_resource.rb +17 -0
  108. data/lib/d4h/api/resources/member_group_membership_resource.rb +21 -0
  109. data/lib/d4h/api/resources/member_group_resource.rb +33 -0
  110. data/lib/d4h/api/resources/member_qualification_award_resource.rb +21 -0
  111. data/lib/d4h/api/resources/member_qualification_resource.rb +21 -0
  112. data/lib/d4h/api/resources/member_resource.rb +21 -0
  113. data/lib/d4h/api/resources/member_retired_reason_resource.rb +17 -0
  114. data/lib/d4h/api/resources/organisation_resource.rb +13 -0
  115. data/lib/d4h/api/resources/repair_resource.rb +33 -0
  116. data/lib/d4h/api/resources/resource_bundle_resource.rb +21 -0
  117. data/lib/d4h/api/resources/role_resource.rb +21 -0
  118. data/lib/d4h/api/resources/search_result_resource.rb +17 -0
  119. data/lib/d4h/api/resources/tag_resource.rb +33 -0
  120. data/lib/d4h/api/resources/team_resource.rb +13 -0
  121. data/lib/d4h/api/resources/whiteboard_resource.rb +33 -0
  122. data/lib/d4h/api/resources/whoami_resource.rb +13 -0
  123. data/lib/d4h.rb +156 -0
  124. data.tar.gz.sig +0 -0
  125. metadata +264 -0
  126. metadata.gz.sig +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 90ba7bf33fc815fbea860ba872f991052c3bf4057383275cffeca1212c1c53af
4
+ data.tar.gz: 4f37a538b43e1162fe706c229004a469b744a9521c5ea54df0c543baa802b28f
5
+ SHA512:
6
+ metadata.gz: e5a6ff0f16ca0cddc34e344a0bc9b31d347002885de3d7c8133cc78248b24bbd84d922ad6a68907b481a7e15a441a9f30ec06823797fd2a7e84a6bec1205aced
7
+ data.tar.gz: ada411f80bc829d3e582a0200b55569dc634daf580b58802e70d55c048b33559eec12ee2c89b1ac6f4f2f7fe78fb78b9a11fefe4b7e3ab2042b90283c9e52d03
checksums.yaml.gz.sig ADDED
Binary file
data/LICENSE.md ADDED
@@ -0,0 +1,136 @@
1
+ # Hippocratic License
2
+
3
+ Version: 2.1.0.
4
+
5
+ Purpose. The purpose of this License is for the Licensor named above to permit
6
+ the Licensee (as defined below) broad permission, if consistent with Human
7
+ Rights Laws and Human Rights Principles (as each is defined below), to use and
8
+ work with the Software (as defined below) within the full scope of Licensor’s
9
+ copyright and patent rights, if any, in the Software, while ensuring attribution
10
+ and protecting the Licensor from liability.
11
+
12
+ Permission and Conditions. The Licensor grants permission by this license (
13
+ “License”), free of charge, to the extent of Licensor’s rights under applicable
14
+ copyright and patent law, to any person or entity (the “Licensee”) obtaining a
15
+ copy of this software and associated documentation files (the “Software”), to do
16
+ everything with the Software that would otherwise infringe (i) the Licensor’s
17
+ copyright in the Software or (ii) any patent claims to the Software that the
18
+ Licensor can license or becomes able to license, subject to all of the following
19
+ terms and conditions:
20
+
21
+ * Acceptance. This License is automatically offered to every person and entity
22
+ subject to its terms and conditions. Licensee accepts this License and agrees
23
+ to its terms and conditions by taking any action with the Software that,
24
+ absent this License, would infringe any intellectual property right held by
25
+ Licensor.
26
+
27
+ * Notice. Licensee must ensure that everyone who gets a copy of any part of this
28
+ Software from Licensee, with or without changes, also receives the License and
29
+ the above copyright notice (and if included by the Licensor, patent, trademark
30
+ and attribution notice). Licensee must cause any modified versions of the
31
+ Software to carry prominent notices stating that Licensee changed the
32
+ Software. For clarity, although Licensee is free to create modifications of
33
+ the Software and distribute only the modified portion created by Licensee with
34
+ additional or different terms, the portion of the Software not modified must
35
+ be distributed pursuant to this License. If anyone notifies Licensee in
36
+ writing that Licensee has not complied with this Notice section, Licensee can
37
+ keep this License by taking all practical steps to comply within 30 days after
38
+ the notice. If Licensee does not do so, Licensee’s License (and all rights
39
+ licensed hereunder) shall end immediately.
40
+
41
+ * Compliance with Human Rights Principles and Human Rights Laws.
42
+
43
+ 1. Human Rights Principles.
44
+
45
+ (a) Licensee is advised to consult the articles of the United Nations
46
+ Universal Declaration of Human Rights and the United Nations Global
47
+ Compact that define recognized principles of international human rights (
48
+ the “Human Rights Principles”). Licensee shall use the Software in a
49
+ manner consistent with Human Rights Principles.
50
+
51
+ (b) Unless the Licensor and Licensee agree otherwise, any dispute,
52
+ controversy, or claim arising out of or relating to (i) Section 1(a)
53
+ regarding Human Rights Principles, including the breach of Section 1(a),
54
+ termination of this License for breach of the Human Rights Principles, or
55
+ invalidity of Section 1(a) or (ii) a determination of whether any Law is
56
+ consistent or in conflict with Human Rights Principles pursuant to
57
+ Section 2, below, shall be settled by arbitration in accordance with the
58
+ Hague Rules on Business and Human Rights Arbitration (the “Rules”);
59
+ provided, however, that Licensee may elect not to participate in such
60
+ arbitration, in which event this License (and all rights licensed
61
+ hereunder) shall end immediately. The number of arbitrators shall be one
62
+ unless the Rules require otherwise.
63
+
64
+ Unless both the Licensor and Licensee agree to the contrary: (1) All
65
+ documents and information concerning the arbitration shall be public and
66
+ may be disclosed by any party; (2) The repository referred to under
67
+ Article 43 of the Rules shall make available to the public in a timely
68
+ manner all documents concerning the arbitration which are communicated to
69
+ it, including all submissions of the parties, all evidence admitted into
70
+ the record of the proceedings, all transcripts or other recordings of
71
+ hearings and all orders, decisions and awards of the arbitral tribunal,
72
+ subject only to the arbitral tribunal's powers to take such measures as
73
+ may be necessary to safeguard the integrity of the arbitral process
74
+ pursuant to Articles 18, 33, 41 and 42 of the Rules; and (3) Article 26(
75
+ 6) of the Rules shall not apply.
76
+
77
+ 2. Human Rights Laws. The Software shall not be used by any person or entity
78
+ for any systems, activities, or other uses that violate any Human Rights
79
+ Laws. “Human Rights Laws” means any applicable laws, regulations, or
80
+ rules (collectively, “Laws”) that protect human, civil, labor, privacy,
81
+ political, environmental, security, economic, due process, or similar
82
+ rights; provided, however, that such Laws are consistent and not in
83
+ conflict with Human Rights Principles (a dispute over the consistency or
84
+ a conflict between Laws and Human Rights Principles shall be determined
85
+ by arbitration as stated above). Where the Human Rights Laws of more than
86
+ one jurisdiction are applicable or in conflict with respect to the use of
87
+ the Software, the Human Rights Laws that are most protective of the
88
+ individuals or groups harmed shall apply.
89
+
90
+ 3. Indemnity. Licensee shall hold harmless and indemnify Licensor (and any
91
+ other contributor) against all losses, damages, liabilities,
92
+ deficiencies, claims, actions, judgments, settlements, interest, awards,
93
+ penalties, fines, costs, or expenses of whatever kind, including
94
+ Licensor’s reasonable attorneys’ fees, arising out of or relating to
95
+ Licensee’s use of the Software in violation of Human Rights Laws or Human
96
+ Rights Principles.
97
+
98
+ * Failure to Comply. Any failure of Licensee to act according to the terms and
99
+ conditions of this License is both a breach of the License and an infringement
100
+ of the intellectual property rights of the Licensor (subject to exceptions
101
+ under Laws, e.g., fair use). In the event of a breach or infringement, the
102
+ terms and conditions of this License may be enforced by Licensor under the
103
+ Laws of any jurisdiction to which Licensee is subject. Licensee also agrees
104
+ that the Licensor may enforce the terms and conditions of this License against
105
+ Licensee through specific performance (or similar remedy under Laws) to the
106
+ extent permitted by Laws. For clarity, except in the event of a breach of this
107
+ License, infringement, or as otherwise stated in this License, Licensor may
108
+ not terminate this License with Licensee.
109
+
110
+ * Enforceability and Interpretation. If any term or provision of this License is
111
+ determined to be invalid, illegal, or unenforceable by a court of competent
112
+ jurisdiction, then such invalidity, illegality, or unenforceability shall not
113
+ affect any other term or provision of this License or invalidate or render
114
+ unenforceable such term or provision in any other jurisdiction; provided,
115
+ however, subject to a court modification pursuant to the immediately following
116
+ sentence, if any term or provision of this License pertaining to Human Rights
117
+ Laws or Human Rights Principles is deemed invalid, illegal, or unenforceable
118
+ against Licensee by a court of competent jurisdiction, all rights in the
119
+ Software granted to Licensee shall be deemed null and void as between Licensor
120
+ and Licensee. Upon a determination that any term or provision is invalid,
121
+ illegal, or unenforceable, to the extent permitted by Laws, the court may
122
+ modify this License to affect the original purpose that the Software be used
123
+ in compliance with Human Rights Principles and Human Rights Laws as closely as
124
+ possible. The language in this License shall be interpreted as to its fair
125
+ meaning and not strictly for or against any party.
126
+
127
+ * Disclaimer. TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES “AS IS,”
128
+ WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR AND ANY OTHER
129
+ CONTRIBUTOR SHALL NOT BE LIABLE TO ANYONE FOR ANY DAMAGES OR OTHER LIABILITY
130
+ ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE,
131
+ UNDER ANY KIND OF LEGAL CLAIM.
132
+
133
+ This Hippocratic License is
134
+ an [Ethical Source license](https://ethicalsource.dev) and is offered for use by
135
+ licensors and licensees at their own risk, on an “AS IS” basis, and with no
136
+ warranties express or implied, to the maximum extent permitted by Laws.