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
@@ -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 &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; 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 &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; 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 &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.
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 &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;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
55
+ # @option opts [Integer] :limit 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;.
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 &lt;code&gt;0&lt;/code&gt;.
57
+ # @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of &lt;code&gt;fieldname:(asc|desc)&lt;/code&gt;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
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 &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; 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 &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; 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 &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.
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 &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;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
70
+ # @option opts [Integer] :limit 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;.
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 &lt;code&gt;0&lt;/code&gt;.
72
+ # @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of &lt;code&gt;fieldname:(asc|desc)&lt;/code&gt;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
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 &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; 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 &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; 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 &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.
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 &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;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
70
+ # @option opts [Integer] :limit 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;.
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 &lt;code&gt;0&lt;/code&gt;.
72
+ # @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of &lt;code&gt;fieldname:(asc|desc)&lt;/code&gt;.
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
+ # &lt;iframe width&#x3D;\&quot;100%\&quot; height&#x3D;\&quot;300px\&quot; src&#x3D;\&quot;http://reliefweb.int/help/api/field-definitions#jobs\&quot;&gt;&lt;/iframe&gt;
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
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 &lt;code&gt;field&lt;/code&gt; or &lt;code&gt;conditions&lt;/code&gt; 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 &lt;code&gt;range&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt; 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 &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.
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 &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;.
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 &lt;code&gt;date&lt;/code&gt; you may exclude &lt;code&gt;date.changed&lt;/code&gt;.
70
+ # @option opts [Integer] :limit 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;.
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 &lt;code&gt;0&lt;/code&gt;.
72
+ # @option opts [Array<String>] :sort Sort the list results. Defaults to search relevance. Values in the form of &lt;code&gt;fieldname:(asc|desc)&lt;/code&gt;.
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
+ # &lt;div id&#x3D;\&quot;reports-fields\&quot;&gt;&lt;/div&gt;
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