reliefweb-api 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,15 @@
|
|
1
|
+
=begin
|
2
|
+
#The ReliefWeb API
|
3
|
+
|
4
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: api@reliefweb.int
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module ReliefWebAPI
|
14
|
+
VERSION = '1.0.0'
|
15
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#The ReliefWeb API
|
5
|
+
|
6
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
Contact: api@reliefweb.int
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.12
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "reliefweb-api/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "reliefweb-api"
|
20
|
+
s.version = ReliefWebAPI::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Sri Prasanna Karuppapillai"]
|
23
|
+
s.email = ["api@reliefweb.int"]
|
24
|
+
s.homepage = "https://apidoc.rwlabs.org/"
|
25
|
+
s.summary = "The ReliefWeb API Ruby Gem"
|
26
|
+
s.description = "Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions."
|
27
|
+
s.license = 'MIT'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
#The ReliefWeb API
|
3
|
+
|
4
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: api@reliefweb.int
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for ReliefWebAPI::CountriesApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'CountriesApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ReliefWebAPI::CountriesApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of CountriesApi' do
|
30
|
+
it 'should create an instance of CountriesApi' do
|
31
|
+
expect(@instance).to be_instance_of(ReliefWebAPI::CountriesApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_countries
|
36
|
+
# List or search countries covered by ReliefWeb.
|
37
|
+
#
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :query_value Specify the terms of your fuzzy search. The default is no query.
|
40
|
+
# @option opts [String] :query_operator Specify the operator by which your search query words will be combined.
|
41
|
+
# @option opts [Array<String>] :query_fields Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation.
|
42
|
+
# @option opts [String] :filter_field Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
|
43
|
+
# @option opts [Array<String>] :filter_value 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.
|
44
|
+
# @option opts [String] :filter_operator Operator by which filters will be combined.
|
45
|
+
# @option opts [BOOLEAN] :filter_negate Reverse the filter to include those items that do not match.
|
46
|
+
# @option opts [Array<String>] :filter_conditions 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.
|
47
|
+
# @option opts [String] :facets_field Field to facet by. May include dates, references or the status field.
|
48
|
+
# @option opts [String] :facets_name Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
|
49
|
+
# @option opts [Integer] :facets_limit Limit the number of facets returned for non-date based facets.
|
50
|
+
# @option opts [String] :facets_sort 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>.
|
51
|
+
# @option opts [Array<String>] :facets_filter Apply all the same capabilities of the filter parameter to the specific results of this facet request.
|
52
|
+
# @option opts [String] :facets_interval 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.
|
53
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
54
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
55
|
+
# @option opts [Integer] :limit The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>.
|
56
|
+
# @option opts [Integer] :offset The offset from which to return the items in a list query. Allows paging through all results. The default is <code>0</code>.
|
57
|
+
# @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
|
58
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
59
|
+
# @option opts [String] :preset Pre-built standard configurations of queries, filters and sorts for common use cases.
|
60
|
+
# @return [Country]
|
61
|
+
describe 'get_countries test' do
|
62
|
+
it 'should work' do
|
63
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# unit tests for get_country_by_id
|
68
|
+
# Find country by its unique ID
|
69
|
+
# Individual countries
|
70
|
+
# @param country_id The identifier of the country
|
71
|
+
# @param [Hash] opts the optional parameters
|
72
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
73
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
74
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
75
|
+
# @return [Country]
|
76
|
+
describe 'get_country_by_id test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# unit tests for search_countries
|
83
|
+
# List or search countries covered by ReliefWeb.
|
84
|
+
#
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [PostParams] :fields Returned fields
|
87
|
+
# @return [Country]
|
88
|
+
describe 'search_countries test' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
#The ReliefWeb API
|
3
|
+
|
4
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: api@reliefweb.int
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for ReliefWebAPI::DisastersApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'DisastersApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ReliefWebAPI::DisastersApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of DisastersApi' do
|
30
|
+
it 'should create an instance of DisastersApi' do
|
31
|
+
expect(@instance).to be_instance_of(ReliefWebAPI::DisastersApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_disaster_by_id
|
36
|
+
# Find disaster by its unique ID
|
37
|
+
# Individual disasters
|
38
|
+
# @param disaster_id The identifier of the disaster
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
41
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
42
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
43
|
+
# @return [Disaster]
|
44
|
+
describe 'get_disaster_by_id test' do
|
45
|
+
it 'should work' do
|
46
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# unit tests for get_disasters
|
51
|
+
# List or search disasters covered by ReliefWeb.
|
52
|
+
#
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @option opts [String] :query_value Specify the terms of your fuzzy search. The default is no query.
|
55
|
+
# @option opts [String] :query_operator Specify the operator by which your search query words will be combined.
|
56
|
+
# @option opts [Array<String>] :query_fields Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation.
|
57
|
+
# @option opts [String] :filter_field Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
|
58
|
+
# @option opts [Array<String>] :filter_value 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.
|
59
|
+
# @option opts [String] :filter_operator Operator by which filters will be combined.
|
60
|
+
# @option opts [BOOLEAN] :filter_negate Reverse the filter to include those items that do not match.
|
61
|
+
# @option opts [Array<String>] :filter_conditions 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.
|
62
|
+
# @option opts [String] :facets_field Field to facet by. May include dates, references or the status field.
|
63
|
+
# @option opts [String] :facets_name Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
|
64
|
+
# @option opts [Integer] :facets_limit Limit the number of facets returned for non-date based facets.
|
65
|
+
# @option opts [String] :facets_sort 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>.
|
66
|
+
# @option opts [Array<String>] :facets_filter Apply all the same capabilities of the filter parameter to the specific results of this facet request.
|
67
|
+
# @option opts [String] :facets_interval 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.
|
68
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
69
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
70
|
+
# @option opts [Integer] :limit The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>.
|
71
|
+
# @option opts [Integer] :offset The offset from which to return the items in a list query. Allows paging through all results. The default is <code>0</code>.
|
72
|
+
# @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
|
73
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
74
|
+
# @option opts [String] :preset Pre-built standard configurations of queries, filters and sorts for common use cases.
|
75
|
+
# @return [Disaster]
|
76
|
+
describe 'get_disasters test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# unit tests for search_disasters
|
83
|
+
# List or search disasters covered by ReliefWeb.
|
84
|
+
#
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [PostParams] :fields Returned fields
|
87
|
+
# @return [Disaster]
|
88
|
+
describe 'search_disasters test' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
=begin
|
2
|
+
#The ReliefWeb API
|
3
|
+
|
4
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: api@reliefweb.int
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for ReliefWebAPI::DiscoveryApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'DiscoveryApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ReliefWebAPI::DiscoveryApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of DiscoveryApi' do
|
30
|
+
it 'should create an instance of DiscoveryApi' do
|
31
|
+
expect(@instance).to be_instance_of(ReliefWebAPI::DiscoveryApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for discovery_resources
|
36
|
+
# Review list of main entrypoints and top-level resources.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [nil]
|
39
|
+
describe 'discovery_resources test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# unit tests for discovery_versions
|
46
|
+
# Review location and status of all versions.
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [nil]
|
49
|
+
describe 'discovery_versions test' do
|
50
|
+
it 'should work' do
|
51
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
#The ReliefWeb API
|
3
|
+
|
4
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: api@reliefweb.int
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for ReliefWebAPI::JobsApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'JobsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ReliefWebAPI::JobsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of JobsApi' do
|
30
|
+
it 'should create an instance of JobsApi' do
|
31
|
+
expect(@instance).to be_instance_of(ReliefWebAPI::JobsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_job_by_id
|
36
|
+
# Find job by its unique ID
|
37
|
+
# Individual jobs.
|
38
|
+
# @param job_id The identifier of the job.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
41
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
42
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
43
|
+
# @return [Job]
|
44
|
+
describe 'get_job_by_id test' do
|
45
|
+
it 'should work' do
|
46
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# unit tests for get_jobs
|
51
|
+
# List or search humanitarian job offers.
|
52
|
+
#
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @option opts [String] :query_value Specify the terms of your fuzzy search. The default is no query.
|
55
|
+
# @option opts [String] :query_operator Specify the operator by which your search query words will be combined.
|
56
|
+
# @option opts [Array<String>] :query_fields Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation.
|
57
|
+
# @option opts [String] :filter_field Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
|
58
|
+
# @option opts [Array<String>] :filter_value 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.
|
59
|
+
# @option opts [String] :filter_operator Operator by which filters will be combined.
|
60
|
+
# @option opts [BOOLEAN] :filter_negate Reverse the filter to include those items that do not match.
|
61
|
+
# @option opts [Array<String>] :filter_conditions 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.
|
62
|
+
# @option opts [String] :facets_field Field to facet by. May include dates, references or the status field.
|
63
|
+
# @option opts [String] :facets_name Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
|
64
|
+
# @option opts [Integer] :facets_limit Limit the number of facets returned for non-date based facets.
|
65
|
+
# @option opts [String] :facets_sort 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>.
|
66
|
+
# @option opts [Array<String>] :facets_filter Apply all the same capabilities of the filter parameter to the specific results of this facet request.
|
67
|
+
# @option opts [String] :facets_interval 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.
|
68
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
69
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
70
|
+
# @option opts [Integer] :limit The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>.
|
71
|
+
# @option opts [Integer] :offset The offset from which to return the items in a list query. Allows paging through all results. The default is <code>0</code>.
|
72
|
+
# @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
|
73
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
74
|
+
# @option opts [String] :preset Pre-built standard configurations of queries, filters and sorts for common use cases.
|
75
|
+
# @return [Job]
|
76
|
+
describe 'get_jobs test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# unit tests for search_jobs
|
83
|
+
# List or search humanitarian job offers.
|
84
|
+
# <iframe width=\"100%\" height=\"300px\" src=\"http://reliefweb.int/help/api/field-definitions#jobs\"></iframe>
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [PostParams] :fields Returned fields
|
87
|
+
# @return [Job]
|
88
|
+
describe 'search_jobs test' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
#The ReliefWeb API
|
3
|
+
|
4
|
+
#Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.<br><br> Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.<br><br> The vast majority of content on ReliefWeb has been contributed by humanitarian partners. We owe it to the community to make data more accessible and reusable, so that developers can build tools that increase exposure for valuable content and facilitate analysis for better decisions.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: api@reliefweb.int
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for ReliefWebAPI::ReportsApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ReportsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ReliefWebAPI::ReportsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ReportsApi' do
|
30
|
+
it 'should create an instance of ReportsApi' do
|
31
|
+
expect(@instance).to be_instance_of(ReliefWebAPI::ReportsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_report_by_id
|
36
|
+
# Find report by its unique ID
|
37
|
+
# Individual reports.
|
38
|
+
# @param report_id The identifier of the report.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
41
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
42
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
43
|
+
# @return [Report]
|
44
|
+
describe 'get_report_by_id test' do
|
45
|
+
it 'should work' do
|
46
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# unit tests for get_reports
|
51
|
+
# List or search updates, headlines or maps.
|
52
|
+
#
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @option opts [String] :query_value Specify the terms of your fuzzy search. The default is no query.
|
55
|
+
# @option opts [String] :query_operator Specify the operator by which your search query words will be combined.
|
56
|
+
# @option opts [Array<String>] :query_fields Specify which fields to target with your search. You may use boost syntax here, see the Advanced API Usage documentation.
|
57
|
+
# @option opts [String] :filter_field Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
|
58
|
+
# @option opts [Array<String>] :filter_value 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.
|
59
|
+
# @option opts [String] :filter_operator Operator by which filters will be combined.
|
60
|
+
# @option opts [BOOLEAN] :filter_negate Reverse the filter to include those items that do not match.
|
61
|
+
# @option opts [Array<String>] :filter_conditions 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.
|
62
|
+
# @option opts [String] :facets_field Field to facet by. May include dates, references or the status field.
|
63
|
+
# @option opts [String] :facets_name Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
|
64
|
+
# @option opts [Integer] :facets_limit Limit the number of facets returned for non-date based facets.
|
65
|
+
# @option opts [String] :facets_sort 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>.
|
66
|
+
# @option opts [Array<String>] :facets_filter Apply all the same capabilities of the filter parameter to the specific results of this facet request.
|
67
|
+
# @option opts [String] :facets_interval 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.
|
68
|
+
# @option opts [Array<String>] :fields_include Specify which fields to include for each item. Defaults to an item label.
|
69
|
+
# @option opts [Array<String>] :fields_exclude Specify sub-fields to exclude from overall results. For example, if you include <code>date</code> you may exclude <code>date.changed</code>.
|
70
|
+
# @option opts [Integer] :limit The maximum number of items to return for a list query. The default is <code>10</code> and the maximum <code>1000</code>.
|
71
|
+
# @option opts [Integer] :offset The offset from which to return the items in a list query. Allows paging through all results. The default is <code>0</code>.
|
72
|
+
# @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
|
73
|
+
# @option opts [String] :profile Pre-built standard selections of fields to return for ease of displaying lists or items.
|
74
|
+
# @option opts [String] :preset Pre-built standard configurations of queries, filters and sorts for common use cases.
|
75
|
+
# @return [Report]
|
76
|
+
describe 'get_reports test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# unit tests for search_reports
|
83
|
+
# List or search updates, headlines or maps.
|
84
|
+
# <div id=\"reports-fields\"></div>
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [PostParams] :fields Returned fields
|
87
|
+
# @return [Report]
|
88
|
+
describe 'search_reports test' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|