reliefweb-api 1.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 (142) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +163 -0
  4. data/Rakefile +8 -0
  5. data/config.json +8 -0
  6. data/docs/Category.md +9 -0
  7. data/docs/CountriesApi.md +202 -0
  8. data/docs/Country.md +12 -0
  9. data/docs/Date.md +10 -0
  10. data/docs/Disaster.md +20 -0
  11. data/docs/DisastersApi.md +202 -0
  12. data/docs/DiscoveryApi.md +88 -0
  13. data/docs/Error.md +9 -0
  14. data/docs/ErrorDefinition.md +7 -0
  15. data/docs/FacetsFieldPost.md +7 -0
  16. data/docs/FacetsFilterPost.md +7 -0
  17. data/docs/FacetsIntervalPost.md +7 -0
  18. data/docs/FacetsLimitPost.md +7 -0
  19. data/docs/FacetsNamePost.md +7 -0
  20. data/docs/FacetsSortPost.md +7 -0
  21. data/docs/FieldsExcludePost.md +7 -0
  22. data/docs/FieldsIncludePost.md +7 -0
  23. data/docs/File.md +12 -0
  24. data/docs/FilterConditionsPost.md +7 -0
  25. data/docs/FilterFieldPost.md +7 -0
  26. data/docs/FilterNegatePost.md +7 -0
  27. data/docs/FilterOperatorPost.md +7 -0
  28. data/docs/FilterValuePost.md +7 -0
  29. data/docs/Job.md +23 -0
  30. data/docs/JobsApi.md +202 -0
  31. data/docs/Language.md +10 -0
  32. data/docs/LimitPost.md +7 -0
  33. data/docs/Location.md +8 -0
  34. data/docs/OffsetPost.md +7 -0
  35. data/docs/PostParams.md +28 -0
  36. data/docs/PresetPost.md +7 -0
  37. data/docs/ProfilePost.md +7 -0
  38. data/docs/QueryFieldsPost.md +7 -0
  39. data/docs/QueryOperatorPost.md +7 -0
  40. data/docs/QueryValuePost.md +7 -0
  41. data/docs/Report.md +19 -0
  42. data/docs/ReportsApi.md +202 -0
  43. data/docs/SortPost.md +7 -0
  44. data/docs/Source.md +14 -0
  45. data/docs/SourcesApi.md +202 -0
  46. data/docs/Training.md +23 -0
  47. data/docs/TrainingApi.md +202 -0
  48. data/git_push.sh +55 -0
  49. data/lib/reliefweb-api.rb +81 -0
  50. data/lib/reliefweb-api/api/countries_api.rb +277 -0
  51. data/lib/reliefweb-api/api/disasters_api.rb +277 -0
  52. data/lib/reliefweb-api/api/discovery_api.rb +113 -0
  53. data/lib/reliefweb-api/api/jobs_api.rb +277 -0
  54. data/lib/reliefweb-api/api/reports_api.rb +277 -0
  55. data/lib/reliefweb-api/api/sources_api.rb +277 -0
  56. data/lib/reliefweb-api/api/training_api.rb +277 -0
  57. data/lib/reliefweb-api/api_client.rb +388 -0
  58. data/lib/reliefweb-api/api_error.rb +38 -0
  59. data/lib/reliefweb-api/configuration.rb +202 -0
  60. data/lib/reliefweb-api/models/category.rb +192 -0
  61. data/lib/reliefweb-api/models/country.rb +220 -0
  62. data/lib/reliefweb-api/models/date.rb +202 -0
  63. data/lib/reliefweb-api/models/disaster.rb +299 -0
  64. data/lib/reliefweb-api/models/error.rb +192 -0
  65. data/lib/reliefweb-api/models/error_definition.rb +174 -0
  66. data/lib/reliefweb-api/models/facets_field_post.rb +175 -0
  67. data/lib/reliefweb-api/models/facets_filter_post.rb +175 -0
  68. data/lib/reliefweb-api/models/facets_interval_post.rb +32 -0
  69. data/lib/reliefweb-api/models/facets_limit_post.rb +175 -0
  70. data/lib/reliefweb-api/models/facets_name_post.rb +175 -0
  71. data/lib/reliefweb-api/models/facets_sort_post.rb +175 -0
  72. data/lib/reliefweb-api/models/fields_exclude_post.rb +175 -0
  73. data/lib/reliefweb-api/models/fields_include_post.rb +175 -0
  74. data/lib/reliefweb-api/models/file.rb +219 -0
  75. data/lib/reliefweb-api/models/filter_conditions_post.rb +175 -0
  76. data/lib/reliefweb-api/models/filter_field_post.rb +175 -0
  77. data/lib/reliefweb-api/models/filter_negate_post.rb +175 -0
  78. data/lib/reliefweb-api/models/filter_operator_post.rb +30 -0
  79. data/lib/reliefweb-api/models/filter_value_post.rb +175 -0
  80. data/lib/reliefweb-api/models/job.rb +330 -0
  81. data/lib/reliefweb-api/models/language.rb +201 -0
  82. data/lib/reliefweb-api/models/limit_post.rb +175 -0
  83. data/lib/reliefweb-api/models/location.rb +183 -0
  84. data/lib/reliefweb-api/models/offset_post.rb +175 -0
  85. data/lib/reliefweb-api/models/post_params.rb +363 -0
  86. data/lib/reliefweb-api/models/preset_post.rb +31 -0
  87. data/lib/reliefweb-api/models/profile_post.rb +31 -0
  88. data/lib/reliefweb-api/models/query_fields_post.rb +175 -0
  89. data/lib/reliefweb-api/models/query_operator_post.rb +30 -0
  90. data/lib/reliefweb-api/models/query_value_post.rb +175 -0
  91. data/lib/reliefweb-api/models/report.rb +293 -0
  92. data/lib/reliefweb-api/models/sort_post.rb +175 -0
  93. data/lib/reliefweb-api/models/source.rb +237 -0
  94. data/lib/reliefweb-api/models/training.rb +330 -0
  95. data/lib/reliefweb-api/version.rb +15 -0
  96. data/reliefweb-api.gemspec +45 -0
  97. data/spec/api/countries_api_spec.rb +94 -0
  98. data/spec/api/disasters_api_spec.rb +94 -0
  99. data/spec/api/discovery_api_spec.rb +55 -0
  100. data/spec/api/jobs_api_spec.rb +94 -0
  101. data/spec/api/reports_api_spec.rb +94 -0
  102. data/spec/api/sources_api_spec.rb +94 -0
  103. data/spec/api/training_api_spec.rb +94 -0
  104. data/spec/api_client_spec.rb +226 -0
  105. data/spec/configuration_spec.rb +42 -0
  106. data/spec/models/category_spec.rb +47 -0
  107. data/spec/models/country_spec.rb +65 -0
  108. data/spec/models/date_spec.rb +53 -0
  109. data/spec/models/disaster_spec.rb +113 -0
  110. data/spec/models/error_definition_spec.rb +35 -0
  111. data/spec/models/error_spec.rb +47 -0
  112. data/spec/models/facets_field_post_spec.rb +35 -0
  113. data/spec/models/facets_filter_post_spec.rb +35 -0
  114. data/spec/models/facets_interval_post_spec.rb +35 -0
  115. data/spec/models/facets_limit_post_spec.rb +35 -0
  116. data/spec/models/facets_name_post_spec.rb +35 -0
  117. data/spec/models/facets_sort_post_spec.rb +35 -0
  118. data/spec/models/fields_exclude_post_spec.rb +35 -0
  119. data/spec/models/fields_include_post_spec.rb +35 -0
  120. data/spec/models/file_spec.rb +65 -0
  121. data/spec/models/filter_conditions_post_spec.rb +35 -0
  122. data/spec/models/filter_field_post_spec.rb +35 -0
  123. data/spec/models/filter_negate_post_spec.rb +35 -0
  124. data/spec/models/filter_operator_post_spec.rb +35 -0
  125. data/spec/models/filter_value_post_spec.rb +35 -0
  126. data/spec/models/job_spec.rb +131 -0
  127. data/spec/models/language_spec.rb +53 -0
  128. data/spec/models/limit_post_spec.rb +35 -0
  129. data/spec/models/location_spec.rb +41 -0
  130. data/spec/models/offset_post_spec.rb +35 -0
  131. data/spec/models/post_params_spec.rb +161 -0
  132. data/spec/models/preset_post_spec.rb +35 -0
  133. data/spec/models/profile_post_spec.rb +35 -0
  134. data/spec/models/query_fields_post_spec.rb +35 -0
  135. data/spec/models/query_operator_post_spec.rb +35 -0
  136. data/spec/models/query_value_post_spec.rb +35 -0
  137. data/spec/models/report_spec.rb +107 -0
  138. data/spec/models/sort_post_spec.rb +35 -0
  139. data/spec/models/source_spec.rb +77 -0
  140. data/spec/models/training_spec.rb +131 -0
  141. data/spec/spec_helper.rb +111 -0
  142. metadata +416 -0
data/docs/SortPost.md ADDED
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::SortPost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
data/docs/Source.md ADDED
@@ -0,0 +1,14 @@
1
+ # ReliefWebAPI::Source
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **homepage** | **String** | | [optional]
7
+ **id** | **Integer** | | [optional]
8
+ **link** | **String** | | [optional]
9
+ **longname** | **String** | | [optional]
10
+ **name** | **String** | | [optional]
11
+ **shortname** | **String** | | [optional]
12
+ **type** | [**Category**](Category.md) | | [optional]
13
+
14
+
@@ -0,0 +1,202 @@
1
+ # ReliefWebAPI::SourcesApi
2
+
3
+ All URIs are relative to *http://api.reliefweb.int/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_source_by_id**](SourcesApi.md#get_source_by_id) | **GET** /sources/{sourceId} | Find source by its unique ID
8
+ [**get_sources**](SourcesApi.md#get_sources) | **GET** /sources | List or search organizations providing content to ReliefWeb.
9
+ [**search_sources**](SourcesApi.md#search_sources) | **POST** /sources | List or search organizations providing content to ReliefWeb.
10
+
11
+
12
+ # **get_source_by_id**
13
+ > Source get_source_by_id(source_id, opts)
14
+
15
+ Find source by its unique ID
16
+
17
+ Individual sources.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'reliefweb-api'
23
+
24
+ api_instance = ReliefWebAPI::SourcesApi.new
25
+
26
+ source_id = 'source_id_example' # String | The identifier of the source
27
+
28
+ opts = {
29
+ profile: 'profile_example', # String | Pre-built standard selections of fields to return for ease of displaying lists or items.
30
+ fields_include: ['fields_include_example'], # Array<String> | Specify which fields to include for each item. Defaults to an item label.
31
+ fields_exclude: ['fields_exclude_example'] # Array<String> | Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
32
+ }
33
+
34
+ begin
35
+ #Find source by its unique ID
36
+ result = api_instance.get_source_by_id(source_id, opts)
37
+ p result
38
+ rescue ReliefWebAPI::ApiError => e
39
+ puts "Exception when calling SourcesApi->get_source_by_id: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **source_id** | **String**| The identifier of the source |
48
+ **profile** | **String**| Pre-built standard selections of fields to return for ease of displaying lists or items. | [optional]
49
+ **fields_include** | [**Array&lt;String&gt;**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
50
+ **fields_exclude** | [**Array&lt;String&gt;**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;. | [optional]
51
+
52
+ ### Return type
53
+
54
+ [**Source**](Source.md)
55
+
56
+ ### Authorization
57
+
58
+ No authorization required
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: text/plain; charset=utf-8, application/json
63
+ - **Accept**: application/json
64
+
65
+
66
+
67
+ # **get_sources**
68
+ > Source get_sources(opts)
69
+
70
+ List or search organizations providing content to ReliefWeb.
71
+
72
+
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'reliefweb-api'
78
+
79
+ api_instance = ReliefWebAPI::SourcesApi.new
80
+
81
+ opts = {
82
+ query_value: 'query_value_example', # String | Specify the terms of your fuzzy search. The default is no query.
83
+ query_operator: 'query_operator_example', # String | Specify the operator by which your search query words will be combined.
84
+ query_fields: ['query_fields_example'], # Array<String> | Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation.
85
+ filter_field: 'filter_field_example', # String | Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
86
+ filter_value: ['filter_value_example'], # Array<String> | Value for the field being filtered. Leave blank to require existence of the field, must be present for <code>range</code> and <code>value</code> conditions.
87
+ filter_operator: 'filter_operator_example', # String | Operator by which filters will be combined.
88
+ filter_negate: true, # BOOLEAN | Reverse the filter to include those items that do not match.
89
+ filter_conditions: ['filter_conditions_example'], # Array<String> | This property is used to combine conditions with a logical connector (the <code>operator</code> property). Every condition must contain one of the <code>field</code> or <code>conditions</code> properties.
90
+ facets_field: 'facets_field_example', # String | Field to facet by. May include dates, references or the status field.
91
+ facets_name: 'facets_name_example', # String | Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
92
+ facets_limit: 56, # Integer | Limit the number of facets returned for non-date based facets.
93
+ facets_sort: 'facets_sort_example', # String | The sort order of non-date facets. Sorting may be by <code>value</code> or <code>count</code> of terms, and ascending or descending. <code>count</code> defaults to <code>desc</code>, <code>value</code> defaults to <code>asc</code>.
94
+ facets_filter: ['facets_filter_example'], # Array<String> | Apply all the same capabilities of the filter parameter to the specific results of this facet request.
95
+ facets_interval: 'facets_interval_example', # String | Round date information to the nearest interval unit. Apply all the same capabilities of the filter parameter to the specific results of this facet request.
96
+ fields_include: ['fields_include_example'], # Array<String> | Specify which fields to include for each item. Defaults to an item label.
97
+ fields_exclude: ['fields_exclude_example'] # Array<String> | Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
98
+ limit: 10, # Integer | The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>.
99
+ offset: 0, # Integer | The offset from which to return the items in a list query. Allows paging through all results. The default is <code>0</code>.
100
+ sort: ['sort_example'], # Array<String> | Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
101
+ profile: 'profile_example', # String | Pre-built standard selections of fields to return for ease of displaying lists or items.
102
+ preset: 'preset_example' # String | Pre-built standard configurations of queries, filters and sorts for common use cases.
103
+ }
104
+
105
+ begin
106
+ #List or search organizations providing content to ReliefWeb.
107
+ result = api_instance.get_sources(opts)
108
+ p result
109
+ rescue ReliefWebAPI::ApiError => e
110
+ puts "Exception when calling SourcesApi->get_sources: #{e}"
111
+ end
112
+ ```
113
+
114
+ ### Parameters
115
+
116
+ Name | Type | Description | Notes
117
+ ------------- | ------------- | ------------- | -------------
118
+ **query_value** | **String**| Specify the terms of your fuzzy search. The default is no query. | [optional]
119
+ **query_operator** | **String**| Specify the operator by which your search query words will be combined. | [optional]
120
+ **query_fields** | [**Array&lt;String&gt;**](String.md)| Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation. | [optional]
121
+ **filter_field** | **String**| Field to filter by. Every condition must contain either a &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; property. | [optional]
122
+ **filter_value** | [**Array&lt;String&gt;**](String.md)| Value for the field being filtered. Leave blank to require existence of the field, must be present for &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; conditions. | [optional]
123
+ **filter_operator** | **String**| Operator by which filters will be combined. | [optional]
124
+ **filter_negate** | **BOOLEAN**| Reverse the filter to include those items that do not match. | [optional]
125
+ **filter_conditions** | [**Array&lt;String&gt;**](String.md)| This property is used to combine conditions with a logical connector (the &lt;code&gt;operator&lt;/code&gt; property). Every condition must contain one of the &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; properties. | [optional]
126
+ **facets_field** | **String**| Field to facet by. May include dates, references or the status field. | [optional]
127
+ **facets_name** | **String**| Identifier for resulting facet data. Useful when faceting multiple ways on the same field. | [optional]
128
+ **facets_limit** | **Integer**| Limit the number of facets returned for non-date based facets. | [optional]
129
+ **facets_sort** | **String**| The sort order of non-date facets. Sorting may be by &lt;code&gt;value&lt;/code&gt; or &lt;code&gt;count&lt;/code&gt; of terms, and ascending or descending. &lt;code&gt;count&lt;/code&gt; defaults to &lt;code&gt;desc&lt;/code&gt;, &lt;code&gt;value&lt;/code&gt; defaults to &lt;code&gt;asc&lt;/code&gt;. | [optional]
130
+ **facets_filter** | [**Array&lt;String&gt;**](String.md)| Apply all the same capabilities of the filter parameter to the specific results of this facet request. | [optional]
131
+ **facets_interval** | **String**| Round date information to the nearest interval unit. Apply all the same capabilities of the filter parameter to the specific results of this facet request. | [optional]
132
+ **fields_include** | [**Array&lt;String&gt;**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
133
+ **fields_exclude** | [**Array&lt;String&gt;**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;. | [optional]
134
+ **limit** | **Integer**| The maximum number of items to return for a list query. The default is &lt;code&gt;10&lt;/code&gt; and the maximum &lt;code&gt;1000&lt;/code&gt;. | [optional] [default to 10]
135
+ **offset** | **Integer**| The offset from which to return the items in a list query. Allows paging through all results. The default is &lt;code&gt;0&lt;/code&gt;. | [optional] [default to 0]
136
+ **sort** | [**Array&lt;String&gt;**](String.md)| Sort the list results. Defaults to search relevance. Values in the form of &lt;code&gt;fieldname:(asc|desc)&lt;/code&gt;. | [optional]
137
+ **profile** | **String**| Pre-built standard selections of fields to return for ease of displaying lists or items. | [optional]
138
+ **preset** | **String**| Pre-built standard configurations of queries, filters and sorts for common use cases. | [optional]
139
+
140
+ ### Return type
141
+
142
+ [**Source**](Source.md)
143
+
144
+ ### Authorization
145
+
146
+ No authorization required
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: text/plain; charset=utf-8
151
+ - **Accept**: application/json
152
+
153
+
154
+
155
+ # **search_sources**
156
+ > Source search_sources(opts)
157
+
158
+ List or search organizations providing content to ReliefWeb.
159
+
160
+
161
+
162
+ ### Example
163
+ ```ruby
164
+ # load the gem
165
+ require 'reliefweb-api'
166
+
167
+ api_instance = ReliefWebAPI::SourcesApi.new
168
+
169
+ opts = {
170
+ fields: ReliefWebAPI::PostParams.new # PostParams | Returned fields
171
+ }
172
+
173
+ begin
174
+ #List or search organizations providing content to ReliefWeb.
175
+ result = api_instance.search_sources(opts)
176
+ p result
177
+ rescue ReliefWebAPI::ApiError => e
178
+ puts "Exception when calling SourcesApi->search_sources: #{e}"
179
+ end
180
+ ```
181
+
182
+ ### Parameters
183
+
184
+ Name | Type | Description | Notes
185
+ ------------- | ------------- | ------------- | -------------
186
+ **fields** | [**PostParams**](PostParams.md)| Returned fields | [optional]
187
+
188
+ ### Return type
189
+
190
+ [**Source**](Source.md)
191
+
192
+ ### Authorization
193
+
194
+ No authorization required
195
+
196
+ ### HTTP request headers
197
+
198
+ - **Content-Type**: application/json
199
+ - **Accept**: application/json
200
+
201
+
202
+
data/docs/Training.md ADDED
@@ -0,0 +1,23 @@
1
+ # ReliefWebAPI::Training
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **category** | [**Array&lt;Category&gt;**](Category.md) | | [optional]
7
+ **city** | [**Array&lt;Location&gt;**](Location.md) | | [optional]
8
+ **country** | [**Array&lt;Country&gt;**](Country.md) | | [optional]
9
+ **date** | **Date** | | [optional]
10
+ **description** | **String** | | [optional]
11
+ **description_html** | **String** | | [optional]
12
+ **file** | **Array&lt;File&gt;** | | [optional]
13
+ **format** | [**Array&lt;Category&gt;**](Category.md) | | [optional]
14
+ **how_to_apply_html** | **String** | | [optional]
15
+ **how_to_apply** | **String** | | [optional]
16
+ **id** | **String** | | [optional]
17
+ **language** | [**Language**](Language.md) | | [optional]
18
+ **link** | **String** | | [optional]
19
+ **theme** | [**Array&lt;Category&gt;**](Category.md) | | [optional]
20
+ **title** | **String** | | [optional]
21
+ **url** | **String** | | [optional]
22
+
23
+
@@ -0,0 +1,202 @@
1
+ # ReliefWebAPI::TrainingApi
2
+
3
+ All URIs are relative to *http://api.reliefweb.int/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_training**](TrainingApi.md#get_training) | **GET** /training | List or search humanitarian learning opportunities.
8
+ [**get_training_by_id**](TrainingApi.md#get_training_by_id) | **GET** /training/{trainingId} | Find training by its unique ID
9
+ [**search_training**](TrainingApi.md#search_training) | **POST** /training | List or search humanitarian learning opportunities.
10
+
11
+
12
+ # **get_training**
13
+ > Training get_training(opts)
14
+
15
+ List or search humanitarian learning opportunities.
16
+
17
+
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'reliefweb-api'
23
+
24
+ api_instance = ReliefWebAPI::TrainingApi.new
25
+
26
+ opts = {
27
+ query_value: 'query_value_example', # String | Specify the terms of your fuzzy search. The default is no query.
28
+ query_operator: 'query_operator_example', # String | Specify the operator by which your search query words will be combined.
29
+ query_fields: ['query_fields_example'], # Array<String> | Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation.
30
+ filter_field: 'filter_field_example', # String | Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
31
+ filter_value: ['filter_value_example'], # Array<String> | Value for the field being filtered. Leave blank to require existence of the field, must be present for <code>range</code> and <code>value</code> conditions.
32
+ filter_operator: 'filter_operator_example', # String | Operator by which filters will be combined.
33
+ filter_negate: true, # BOOLEAN | Reverse the filter to include those items that do not match.
34
+ filter_conditions: ['filter_conditions_example'], # Array<String> | This property is used to combine conditions with a logical connector (the <code>operator</code> property). Every condition must contain one of the <code>field</code> or <code>conditions</code> properties.
35
+ facets_field: 'facets_field_example', # String | Field to facet by. May include dates, references or the status field.
36
+ facets_name: 'facets_name_example', # String | Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
37
+ facets_limit: 56, # Integer | Limit the number of facets returned for non-date based facets.
38
+ facets_sort: 'facets_sort_example', # String | The sort order of non-date facets. Sorting may be by <code>value</code> or <code>count</code> of terms, and ascending or descending. <code>count</code> defaults to <code>desc</code>, <code>value</code> defaults to <code>asc</code>.
39
+ facets_filter: ['facets_filter_example'], # Array<String> | Apply all the same capabilities of the filter parameter to the specific results of this facet request.
40
+ facets_interval: 'facets_interval_example', # String | Round date information to the nearest interval unit. Apply all the same capabilities of the filter parameter to the specific results of this facet request.
41
+ fields_include: ['fields_include_example'], # Array<String> | Specify which fields to include for each item. Defaults to an item label.
42
+ fields_exclude: ['fields_exclude_example'] # Array<String> | Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
43
+ limit: 10, # Integer | The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>.
44
+ offset: 0, # Integer | The offset from which to return the items in a list query. Allows paging through all results. The default is <code>0</code>.
45
+ sort: ['sort_example'], # Array<String> | Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
46
+ profile: 'profile_example', # String | Pre-built standard selections of fields to return for ease of displaying lists or items.
47
+ preset: 'preset_example' # String | Pre-built standard configurations of queries, filters and sorts for common use cases.
48
+ }
49
+
50
+ begin
51
+ #List or search humanitarian learning opportunities.
52
+ result = api_instance.get_training(opts)
53
+ p result
54
+ rescue ReliefWebAPI::ApiError => e
55
+ puts "Exception when calling TrainingApi->get_training: #{e}"
56
+ end
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+ Name | Type | Description | Notes
62
+ ------------- | ------------- | ------------- | -------------
63
+ **query_value** | **String**| Specify the terms of your fuzzy search. The default is no query. | [optional]
64
+ **query_operator** | **String**| Specify the operator by which your search query words will be combined. | [optional]
65
+ **query_fields** | [**Array&lt;String&gt;**](String.md)| Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation. | [optional]
66
+ **filter_field** | **String**| Field to filter by. Every condition must contain either a &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; property. | [optional]
67
+ **filter_value** | [**Array&lt;String&gt;**](String.md)| Value for the field being filtered. Leave blank to require existence of the field, must be present for &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; conditions. | [optional]
68
+ **filter_operator** | **String**| Operator by which filters will be combined. | [optional]
69
+ **filter_negate** | **BOOLEAN**| Reverse the filter to include those items that do not match. | [optional]
70
+ **filter_conditions** | [**Array&lt;String&gt;**](String.md)| This property is used to combine conditions with a logical connector (the &lt;code&gt;operator&lt;/code&gt; property). Every condition must contain one of the &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; properties. | [optional]
71
+ **facets_field** | **String**| Field to facet by. May include dates, references or the status field. | [optional]
72
+ **facets_name** | **String**| Identifier for resulting facet data. Useful when faceting multiple ways on the same field. | [optional]
73
+ **facets_limit** | **Integer**| Limit the number of facets returned for non-date based facets. | [optional]
74
+ **facets_sort** | **String**| The sort order of non-date facets. Sorting may be by &lt;code&gt;value&lt;/code&gt; or &lt;code&gt;count&lt;/code&gt; of terms, and ascending or descending. &lt;code&gt;count&lt;/code&gt; defaults to &lt;code&gt;desc&lt;/code&gt;, &lt;code&gt;value&lt;/code&gt; defaults to &lt;code&gt;asc&lt;/code&gt;. | [optional]
75
+ **facets_filter** | [**Array&lt;String&gt;**](String.md)| Apply all the same capabilities of the filter parameter to the specific results of this facet request. | [optional]
76
+ **facets_interval** | **String**| Round date information to the nearest interval unit. Apply all the same capabilities of the filter parameter to the specific results of this facet request. | [optional]
77
+ **fields_include** | [**Array&lt;String&gt;**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
78
+ **fields_exclude** | [**Array&lt;String&gt;**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;. | [optional]
79
+ **limit** | **Integer**| The maximum number of items to return for a list query. The default is &lt;code&gt;10&lt;/code&gt; and the maximum &lt;code&gt;1000&lt;/code&gt;. | [optional] [default to 10]
80
+ **offset** | **Integer**| The offset from which to return the items in a list query. Allows paging through all results. The default is &lt;code&gt;0&lt;/code&gt;. | [optional] [default to 0]
81
+ **sort** | [**Array&lt;String&gt;**](String.md)| Sort the list results. Defaults to search relevance. Values in the form of &lt;code&gt;fieldname:(asc|desc)&lt;/code&gt;. | [optional]
82
+ **profile** | **String**| Pre-built standard selections of fields to return for ease of displaying lists or items. | [optional]
83
+ **preset** | **String**| Pre-built standard configurations of queries, filters and sorts for common use cases. | [optional]
84
+
85
+ ### Return type
86
+
87
+ [**Training**](Training.md)
88
+
89
+ ### Authorization
90
+
91
+ No authorization required
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: text/plain; charset=utf-8
96
+ - **Accept**: application/json
97
+
98
+
99
+
100
+ # **get_training_by_id**
101
+ > Training get_training_by_id(training_id, opts)
102
+
103
+ Find training by its unique ID
104
+
105
+ Individual training opportunities.
106
+
107
+ ### Example
108
+ ```ruby
109
+ # load the gem
110
+ require 'reliefweb-api'
111
+
112
+ api_instance = ReliefWebAPI::TrainingApi.new
113
+
114
+ training_id = 'training_id_example' # String | The identifier of the training opportunity.
115
+
116
+ opts = {
117
+ profile: 'profile_example', # String | Pre-built standard selections of fields to return for ease of displaying lists or items.
118
+ fields_include: ['fields_include_example'], # Array<String> | Specify which fields to include for each item. Defaults to an item label.
119
+ fields_exclude: ['fields_exclude_example'] # Array<String> | Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
120
+ }
121
+
122
+ begin
123
+ #Find training by its unique ID
124
+ result = api_instance.get_training_by_id(training_id, opts)
125
+ p result
126
+ rescue ReliefWebAPI::ApiError => e
127
+ puts "Exception when calling TrainingApi->get_training_by_id: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+ Name | Type | Description | Notes
134
+ ------------- | ------------- | ------------- | -------------
135
+ **training_id** | **String**| The identifier of the training opportunity. |
136
+ **profile** | **String**| Pre-built standard selections of fields to return for ease of displaying lists or items. | [optional]
137
+ **fields_include** | [**Array&lt;String&gt;**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
138
+ **fields_exclude** | [**Array&lt;String&gt;**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;. | [optional]
139
+
140
+ ### Return type
141
+
142
+ [**Training**](Training.md)
143
+
144
+ ### Authorization
145
+
146
+ No authorization required
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: text/plain; charset=utf-8, application/json
151
+ - **Accept**: application/json
152
+
153
+
154
+
155
+ # **search_training**
156
+ > Training search_training(opts)
157
+
158
+ List or search humanitarian learning opportunities.
159
+
160
+
161
+
162
+ ### Example
163
+ ```ruby
164
+ # load the gem
165
+ require 'reliefweb-api'
166
+
167
+ api_instance = ReliefWebAPI::TrainingApi.new
168
+
169
+ opts = {
170
+ fields: ReliefWebAPI::PostParams.new # PostParams | Returned fields
171
+ }
172
+
173
+ begin
174
+ #List or search humanitarian learning opportunities.
175
+ result = api_instance.search_training(opts)
176
+ p result
177
+ rescue ReliefWebAPI::ApiError => e
178
+ puts "Exception when calling TrainingApi->search_training: #{e}"
179
+ end
180
+ ```
181
+
182
+ ### Parameters
183
+
184
+ Name | Type | Description | Notes
185
+ ------------- | ------------- | ------------- | -------------
186
+ **fields** | [**PostParams**](PostParams.md)| Returned fields | [optional]
187
+
188
+ ### Return type
189
+
190
+ [**Training**](Training.md)
191
+
192
+ ### Authorization
193
+
194
+ No authorization required
195
+
196
+ ### HTTP request headers
197
+
198
+ - **Content-Type**: application/json
199
+ - **Accept**: application/json
200
+
201
+
202
+