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.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +163 -0
- data/Rakefile +8 -0
- data/config.json +8 -0
- data/docs/Category.md +9 -0
- data/docs/CountriesApi.md +202 -0
- data/docs/Country.md +12 -0
- data/docs/Date.md +10 -0
- data/docs/Disaster.md +20 -0
- data/docs/DisastersApi.md +202 -0
- data/docs/DiscoveryApi.md +88 -0
- data/docs/Error.md +9 -0
- data/docs/ErrorDefinition.md +7 -0
- data/docs/FacetsFieldPost.md +7 -0
- data/docs/FacetsFilterPost.md +7 -0
- data/docs/FacetsIntervalPost.md +7 -0
- data/docs/FacetsLimitPost.md +7 -0
- data/docs/FacetsNamePost.md +7 -0
- data/docs/FacetsSortPost.md +7 -0
- data/docs/FieldsExcludePost.md +7 -0
- data/docs/FieldsIncludePost.md +7 -0
- data/docs/File.md +12 -0
- data/docs/FilterConditionsPost.md +7 -0
- data/docs/FilterFieldPost.md +7 -0
- data/docs/FilterNegatePost.md +7 -0
- data/docs/FilterOperatorPost.md +7 -0
- data/docs/FilterValuePost.md +7 -0
- data/docs/Job.md +23 -0
- data/docs/JobsApi.md +202 -0
- data/docs/Language.md +10 -0
- data/docs/LimitPost.md +7 -0
- data/docs/Location.md +8 -0
- data/docs/OffsetPost.md +7 -0
- data/docs/PostParams.md +28 -0
- data/docs/PresetPost.md +7 -0
- data/docs/ProfilePost.md +7 -0
- data/docs/QueryFieldsPost.md +7 -0
- data/docs/QueryOperatorPost.md +7 -0
- data/docs/QueryValuePost.md +7 -0
- data/docs/Report.md +19 -0
- data/docs/ReportsApi.md +202 -0
- data/docs/SortPost.md +7 -0
- data/docs/Source.md +14 -0
- data/docs/SourcesApi.md +202 -0
- data/docs/Training.md +23 -0
- data/docs/TrainingApi.md +202 -0
- data/git_push.sh +55 -0
- data/lib/reliefweb-api.rb +81 -0
- data/lib/reliefweb-api/api/countries_api.rb +277 -0
- data/lib/reliefweb-api/api/disasters_api.rb +277 -0
- data/lib/reliefweb-api/api/discovery_api.rb +113 -0
- data/lib/reliefweb-api/api/jobs_api.rb +277 -0
- data/lib/reliefweb-api/api/reports_api.rb +277 -0
- data/lib/reliefweb-api/api/sources_api.rb +277 -0
- data/lib/reliefweb-api/api/training_api.rb +277 -0
- data/lib/reliefweb-api/api_client.rb +388 -0
- data/lib/reliefweb-api/api_error.rb +38 -0
- data/lib/reliefweb-api/configuration.rb +202 -0
- data/lib/reliefweb-api/models/category.rb +192 -0
- data/lib/reliefweb-api/models/country.rb +220 -0
- data/lib/reliefweb-api/models/date.rb +202 -0
- data/lib/reliefweb-api/models/disaster.rb +299 -0
- data/lib/reliefweb-api/models/error.rb +192 -0
- data/lib/reliefweb-api/models/error_definition.rb +174 -0
- data/lib/reliefweb-api/models/facets_field_post.rb +175 -0
- data/lib/reliefweb-api/models/facets_filter_post.rb +175 -0
- data/lib/reliefweb-api/models/facets_interval_post.rb +32 -0
- data/lib/reliefweb-api/models/facets_limit_post.rb +175 -0
- data/lib/reliefweb-api/models/facets_name_post.rb +175 -0
- data/lib/reliefweb-api/models/facets_sort_post.rb +175 -0
- data/lib/reliefweb-api/models/fields_exclude_post.rb +175 -0
- data/lib/reliefweb-api/models/fields_include_post.rb +175 -0
- data/lib/reliefweb-api/models/file.rb +219 -0
- data/lib/reliefweb-api/models/filter_conditions_post.rb +175 -0
- data/lib/reliefweb-api/models/filter_field_post.rb +175 -0
- data/lib/reliefweb-api/models/filter_negate_post.rb +175 -0
- data/lib/reliefweb-api/models/filter_operator_post.rb +30 -0
- data/lib/reliefweb-api/models/filter_value_post.rb +175 -0
- data/lib/reliefweb-api/models/job.rb +330 -0
- data/lib/reliefweb-api/models/language.rb +201 -0
- data/lib/reliefweb-api/models/limit_post.rb +175 -0
- data/lib/reliefweb-api/models/location.rb +183 -0
- data/lib/reliefweb-api/models/offset_post.rb +175 -0
- data/lib/reliefweb-api/models/post_params.rb +363 -0
- data/lib/reliefweb-api/models/preset_post.rb +31 -0
- data/lib/reliefweb-api/models/profile_post.rb +31 -0
- data/lib/reliefweb-api/models/query_fields_post.rb +175 -0
- data/lib/reliefweb-api/models/query_operator_post.rb +30 -0
- data/lib/reliefweb-api/models/query_value_post.rb +175 -0
- data/lib/reliefweb-api/models/report.rb +293 -0
- data/lib/reliefweb-api/models/sort_post.rb +175 -0
- data/lib/reliefweb-api/models/source.rb +237 -0
- data/lib/reliefweb-api/models/training.rb +330 -0
- data/lib/reliefweb-api/version.rb +15 -0
- data/reliefweb-api.gemspec +45 -0
- data/spec/api/countries_api_spec.rb +94 -0
- data/spec/api/disasters_api_spec.rb +94 -0
- data/spec/api/discovery_api_spec.rb +55 -0
- data/spec/api/jobs_api_spec.rb +94 -0
- data/spec/api/reports_api_spec.rb +94 -0
- data/spec/api/sources_api_spec.rb +94 -0
- data/spec/api/training_api_spec.rb +94 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/category_spec.rb +47 -0
- data/spec/models/country_spec.rb +65 -0
- data/spec/models/date_spec.rb +53 -0
- data/spec/models/disaster_spec.rb +113 -0
- data/spec/models/error_definition_spec.rb +35 -0
- data/spec/models/error_spec.rb +47 -0
- data/spec/models/facets_field_post_spec.rb +35 -0
- data/spec/models/facets_filter_post_spec.rb +35 -0
- data/spec/models/facets_interval_post_spec.rb +35 -0
- data/spec/models/facets_limit_post_spec.rb +35 -0
- data/spec/models/facets_name_post_spec.rb +35 -0
- data/spec/models/facets_sort_post_spec.rb +35 -0
- data/spec/models/fields_exclude_post_spec.rb +35 -0
- data/spec/models/fields_include_post_spec.rb +35 -0
- data/spec/models/file_spec.rb +65 -0
- data/spec/models/filter_conditions_post_spec.rb +35 -0
- data/spec/models/filter_field_post_spec.rb +35 -0
- data/spec/models/filter_negate_post_spec.rb +35 -0
- data/spec/models/filter_operator_post_spec.rb +35 -0
- data/spec/models/filter_value_post_spec.rb +35 -0
- data/spec/models/job_spec.rb +131 -0
- data/spec/models/language_spec.rb +53 -0
- data/spec/models/limit_post_spec.rb +35 -0
- data/spec/models/location_spec.rb +41 -0
- data/spec/models/offset_post_spec.rb +35 -0
- data/spec/models/post_params_spec.rb +161 -0
- data/spec/models/preset_post_spec.rb +35 -0
- data/spec/models/profile_post_spec.rb +35 -0
- data/spec/models/query_fields_post_spec.rb +35 -0
- data/spec/models/query_operator_post_spec.rb +35 -0
- data/spec/models/query_value_post_spec.rb +35 -0
- data/spec/models/report_spec.rb +107 -0
- data/spec/models/sort_post_spec.rb +35 -0
- data/spec/models/source_spec.rb +77 -0
- data/spec/models/training_spec.rb +131 -0
- data/spec/spec_helper.rb +111 -0
- 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<String>**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
|
|
50
|
+
**fields_exclude** | [**Array<String>**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>. | [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<String>**](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 <code>field</code> or <code>conditions</code> property. | [optional]
|
|
122
|
+
**filter_value** | [**Array<String>**](String.md)| 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. | [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<String>**](String.md)| 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. | [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 <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>. | [optional]
|
|
130
|
+
**facets_filter** | [**Array<String>**](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<String>**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
|
|
133
|
+
**fields_exclude** | [**Array<String>**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>. | [optional]
|
|
134
|
+
**limit** | **Integer**| The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>. | [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 <code>0</code>. | [optional] [default to 0]
|
|
136
|
+
**sort** | [**Array<String>**](String.md)| Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>. | [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
data/docs/Location.md
ADDED
data/docs/OffsetPost.md
ADDED
data/docs/PostParams.md
ADDED
|
@@ -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
|
+
|
data/docs/PresetPost.md
ADDED
data/docs/ProfilePost.md
ADDED
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<Country>**](Country.md) | | [optional]
|
|
8
|
+
**date** | **Date** | | [optional]
|
|
9
|
+
**format** | [**Array<Category>**](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<Source>**](Source.md) | Report production and coordination bodies. | [optional]
|
|
14
|
+
**status** | **BOOLEAN** | | [optional]
|
|
15
|
+
**theme** | [**Array<Category>**](Category.md) | Category of information contained in the report. | [optional]
|
|
16
|
+
**title** | **String** | | [optional]
|
|
17
|
+
**type** | **String** | | [optional]
|
|
18
|
+
|
|
19
|
+
|
data/docs/ReportsApi.md
ADDED
|
@@ -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<String>**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
|
|
50
|
+
**fields_exclude** | [**Array<String>**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>. | [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<String>**](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 <code>field</code> or <code>conditions</code> property. | [optional]
|
|
122
|
+
**filter_value** | [**Array<String>**](String.md)| 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. | [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<String>**](String.md)| 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. | [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 <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>. | [optional]
|
|
130
|
+
**facets_filter** | [**Array<String>**](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<String>**](String.md)| Specify which fields to include for each item. Defaults to an item label. | [optional]
|
|
133
|
+
**fields_exclude** | [**Array<String>**](String.md)| Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>. | [optional]
|
|
134
|
+
**limit** | **Integer**| The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>. | [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 <code>0</code>. | [optional] [default to 0]
|
|
136
|
+
**sort** | [**Array<String>**](String.md)| Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>. | [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
|
+
|