reliefweb-api
ReliefWebAPI - the Ruby gem for the The ReliefWeb API
Interactive API documentation for the data API of Reliefweb.int. ReliefWeb is a leading source of information on global crises and disasters.
Our continuous coverage and archive going back to the 1970s makes ReliefWeb an unparalleled resource for both current and historical data on humanitarian response.
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.
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
For more information, please visit https://reliefweb.int/contact
Installation
Install from RubyGems
Add this to the Gemfile:
gem 'reliefweb-api'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/sriprasanna/reliefweb-api-ruby-client, then add the following in the Gemfile:
gem 'reliefweb-api', :git => 'https://github.com/sriprasanna/reliefweb-api-ruby-client.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
require 'reliefweb-api'
api_instance = ReliefWebAPI::CountriesApi.new
opts = {
query_value: 'query_value_example',
query_operator: 'query_operator_example',
query_fields: ['query_fields_example'],
filter_field: 'filter_field_example',
filter_value: ['filter_value_example'],
filter_operator: 'filter_operator_example',
filter_negate: true,
filter_conditions: ['filter_conditions_example'],
facets_field: 'facets_field_example',
facets_name: 'facets_name_example',
facets_limit: 56,
facets_sort: 'facets_sort_example',
facets_filter: ['facets_filter_example'],
facets_interval: 'facets_interval_example',
fields_include: ['fields_include_example'],
fields_exclude: ['fields_exclude_example']
limit: 10,
offset: 0,
sort: ['sort_example'],
profile: 'profile_example',
preset: 'preset_example'
}
begin
result = api_instance.get_countries(opts)
p result
rescue ReliefWebAPI::ApiError => e
puts "Exception when calling CountriesApi->get_countries: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.reliefweb.int/v1
Class | Method | HTTP request | Description |
---|
ReliefWebAPI::CountriesApi | get_countries | GET /countries | List or search countries covered by ReliefWeb. |
ReliefWebAPI::CountriesApi | get_country_by_id | GET /countries/{countryId} | Find country by its unique ID |
ReliefWebAPI::CountriesApi | search_countries | POST /countries | List or search countries covered by ReliefWeb. |
ReliefWebAPI::DisastersApi | get_disaster_by_id | GET /disasters/{disasterId} | Find disaster by its unique ID |
ReliefWebAPI::DisastersApi | get_disasters | GET /disasters | List or search disasters covered by ReliefWeb. |
ReliefWebAPI::DisastersApi | search_disasters | POST /disasters | List or search disasters covered by ReliefWeb. |
ReliefWebAPI::DiscoveryApi | discovery_resources | GET / | |
ReliefWebAPI::DiscoveryApi | discovery_versions | GET /../ | |
ReliefWebAPI::JobsApi | get_job_by_id | GET /jobs/{jobId} | Find job by its unique ID |
ReliefWebAPI::JobsApi | get_jobs | GET /jobs | List or search humanitarian job offers. |
ReliefWebAPI::JobsApi | search_jobs | POST /jobs | List or search humanitarian job offers. |
ReliefWebAPI::ReportsApi | get_report_by_id | GET /reports/{reportId} | Find report by its unique ID |
ReliefWebAPI::ReportsApi | get_reports | GET /reports | List or search updates, headlines or maps. |
ReliefWebAPI::ReportsApi | search_reports | POST /reports | List or search updates, headlines or maps. |
ReliefWebAPI::SourcesApi | get_source_by_id | GET /sources/{sourceId} | Find source by its unique ID |
ReliefWebAPI::SourcesApi | get_sources | GET /sources | List or search organizations providing content to ReliefWeb. |
ReliefWebAPI::SourcesApi | search_sources | POST /sources | List or search organizations providing content to ReliefWeb. |
ReliefWebAPI::TrainingApi | get_training | GET /training | List or search humanitarian learning opportunities. |
ReliefWebAPI::TrainingApi | get_training_by_id | GET /training/{trainingId} | Find training by its unique ID |
ReliefWebAPI::TrainingApi | search_training | POST /training | List or search humanitarian learning opportunities. |
Documentation for Models
Documentation for Authorization
All endpoints do not require authorization.