reliefweb-api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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/JobsApi.md ADDED
@@ -0,0 +1,202 @@
1
+ # ReliefWebAPI::JobsApi
2
+
3
+ All URIs are relative to *http://api.reliefweb.int/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_job_by_id**](JobsApi.md#get_job_by_id) | **GET** /jobs/{jobId} | Find job by its unique ID
8
+ [**get_jobs**](JobsApi.md#get_jobs) | **GET** /jobs | List or search humanitarian job offers.
9
+ [**search_jobs**](JobsApi.md#search_jobs) | **POST** /jobs | List or search humanitarian job offers.
10
+
11
+
12
+ # **get_job_by_id**
13
+ > Job get_job_by_id(job_id, opts)
14
+
15
+ Find job by its unique ID
16
+
17
+ Individual jobs.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'reliefweb-api'
23
+
24
+ api_instance = ReliefWebAPI::JobsApi.new
25
+
26
+ job_id = 'job_id_example' # String | The identifier of the job.
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 job by its unique ID
36
+ result = api_instance.get_job_by_id(job_id, opts)
37
+ p result
38
+ rescue ReliefWebAPI::ApiError => e
39
+ puts "Exception when calling JobsApi->get_job_by_id: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **job_id** | **String**| The identifier of the job. |
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
+ [**Job**](Job.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_jobs**
68
+ > Job get_jobs(opts)
69
+
70
+ List or search humanitarian job offers.
71
+
72
+
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'reliefweb-api'
78
+
79
+ api_instance = ReliefWebAPI::JobsApi.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 humanitarian job offers.
107
+ result = api_instance.get_jobs(opts)
108
+ p result
109
+ rescue ReliefWebAPI::ApiError => e
110
+ puts "Exception when calling JobsApi->get_jobs: #{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
+ [**Job**](Job.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_jobs**
156
+ > Job search_jobs(opts)
157
+
158
+ List or search humanitarian job offers.
159
+
160
+ <iframe width=\"100%\" height=\"300px\" src=\"http://reliefweb.int/help/api/field-definitions#jobs\"></iframe>
161
+
162
+ ### Example
163
+ ```ruby
164
+ # load the gem
165
+ require 'reliefweb-api'
166
+
167
+ api_instance = ReliefWebAPI::JobsApi.new
168
+
169
+ opts = {
170
+ fields: ReliefWebAPI::PostParams.new # PostParams | Returned fields
171
+ }
172
+
173
+ begin
174
+ #List or search humanitarian job offers.
175
+ result = api_instance.search_jobs(opts)
176
+ p result
177
+ rescue ReliefWebAPI::ApiError => e
178
+ puts "Exception when calling JobsApi->search_jobs: #{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
+ [**Job**](Job.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/Language.md ADDED
@@ -0,0 +1,10 @@
1
+ # ReliefWebAPI::Language
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **code** | **String** | | [optional]
7
+ **id** | **Integer** | | [optional]
8
+ **name** | **String** | | [optional]
9
+
10
+
data/docs/LimitPost.md ADDED
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::LimitPost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
data/docs/Location.md ADDED
@@ -0,0 +1,8 @@
1
+ # ReliefWebAPI::Location
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | | [optional]
7
+
8
+
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::OffsetPost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,28 @@
1
+ # ReliefWebAPI::PostParams
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **query_value** | [**QueryValuePost**](QueryValuePost.md) | | [optional]
7
+ **query_operator_post** | [**QueryOperatorPost**](QueryOperatorPost.md) | | [optional]
8
+ **query_fields_post** | [**QueryFieldsPost**](QueryFieldsPost.md) | | [optional]
9
+ **filter_field_post** | [**FilterFieldPost**](FilterFieldPost.md) | | [optional]
10
+ **filter_value_post** | [**FilterValuePost**](FilterValuePost.md) | | [optional]
11
+ **filter_operator_post** | [**FilterOperatorPost**](FilterOperatorPost.md) | | [optional]
12
+ **filter_negate_post** | [**FilterNegatePost**](FilterNegatePost.md) | | [optional]
13
+ **filter_conditions_post** | [**FilterConditionsPost**](FilterConditionsPost.md) | | [optional]
14
+ **facets_field_post** | [**FacetsFieldPost**](FacetsFieldPost.md) | | [optional]
15
+ **facets_name_post** | [**FacetsNamePost**](FacetsNamePost.md) | | [optional]
16
+ **facets_limit_post** | [**FacetsLimitPost**](FacetsLimitPost.md) | | [optional]
17
+ **facets_sort_post** | [**FacetsSortPost**](FacetsSortPost.md) | | [optional]
18
+ **facets_filter_post** | [**FacetsFilterPost**](FacetsFilterPost.md) | | [optional]
19
+ **facets_interval_post** | [**FacetsIntervalPost**](FacetsIntervalPost.md) | | [optional]
20
+ **fields_include** | [**FieldsIncludePost**](FieldsIncludePost.md) | | [optional]
21
+ **fields_exclude** | [**FieldsExcludePost**](FieldsExcludePost.md) | | [optional]
22
+ **sort_post** | [**SortPost**](SortPost.md) | | [optional]
23
+ **limit_post** | [**LimitPost**](LimitPost.md) | | [optional]
24
+ **offset_post** | [**OffsetPost**](OffsetPost.md) | | [optional]
25
+ **profile** | [**ProfilePost**](ProfilePost.md) | | [optional]
26
+ **preset_post** | [**PresetPost**](PresetPost.md) | | [optional]
27
+
28
+
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::PresetPost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::ProfilePost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::QueryFieldsPost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::QueryOperatorPost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,7 @@
1
+ # ReliefWebAPI::QueryValuePost
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
data/docs/Report.md ADDED
@@ -0,0 +1,19 @@
1
+ # ReliefWebAPI::Report
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **body** | **String** | | [optional]
7
+ **country** | [**Array&lt;Country&gt;**](Country.md) | | [optional]
8
+ **date** | **Date** | | [optional]
9
+ **format** | [**Array&lt;Category&gt;**](Category.md) | Format of report. | [optional]
10
+ **id** | **Integer** | | [optional]
11
+ **language** | [**Language**](Language.md) | | [optional]
12
+ **primary_country** | [**Country**](Country.md) | | [optional]
13
+ **source** | [**Array&lt;Source&gt;**](Source.md) | Report production and coordination bodies. | [optional]
14
+ **status** | **BOOLEAN** | | [optional]
15
+ **theme** | [**Array&lt;Category&gt;**](Category.md) | Category of information contained in the report. | [optional]
16
+ **title** | **String** | | [optional]
17
+ **type** | **String** | | [optional]
18
+
19
+
@@ -0,0 +1,202 @@
1
+ # ReliefWebAPI::ReportsApi
2
+
3
+ All URIs are relative to *http://api.reliefweb.int/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_report_by_id**](ReportsApi.md#get_report_by_id) | **GET** /reports/{reportId} | Find report by its unique ID
8
+ [**get_reports**](ReportsApi.md#get_reports) | **GET** /reports | List or search updates, headlines or maps.
9
+ [**search_reports**](ReportsApi.md#search_reports) | **POST** /reports | List or search updates, headlines or maps.
10
+
11
+
12
+ # **get_report_by_id**
13
+ > Report get_report_by_id(report_id, opts)
14
+
15
+ Find report by its unique ID
16
+
17
+ Individual reports.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'reliefweb-api'
23
+
24
+ api_instance = ReliefWebAPI::ReportsApi.new
25
+
26
+ report_id = 'report_id_example' # String | The identifier of the report.
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 report by its unique ID
36
+ result = api_instance.get_report_by_id(report_id, opts)
37
+ p result
38
+ rescue ReliefWebAPI::ApiError => e
39
+ puts "Exception when calling ReportsApi->get_report_by_id: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **report_id** | **String**| The identifier of the report. |
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
+ [**Report**](Report.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_reports**
68
+ > Report get_reports(opts)
69
+
70
+ List or search updates, headlines or maps.
71
+
72
+
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'reliefweb-api'
78
+
79
+ api_instance = ReliefWebAPI::ReportsApi.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 updates, headlines or maps.
107
+ result = api_instance.get_reports(opts)
108
+ p result
109
+ rescue ReliefWebAPI::ApiError => e
110
+ puts "Exception when calling ReportsApi->get_reports: #{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
+ [**Report**](Report.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_reports**
156
+ > Report search_reports(opts)
157
+
158
+ List or search updates, headlines or maps.
159
+
160
+ <div id=\"reports-fields\"></div>
161
+
162
+ ### Example
163
+ ```ruby
164
+ # load the gem
165
+ require 'reliefweb-api'
166
+
167
+ api_instance = ReliefWebAPI::ReportsApi.new
168
+
169
+ opts = {
170
+ fields: ReliefWebAPI::PostParams.new # PostParams | Returned fields
171
+ }
172
+
173
+ begin
174
+ #List or search updates, headlines or maps.
175
+ result = api_instance.search_reports(opts)
176
+ p result
177
+ rescue ReliefWebAPI::ApiError => e
178
+ puts "Exception when calling ReportsApi->search_reports: #{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
+ [**Report**](Report.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
+