Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reliefweb-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reliefweb-api

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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:

# Load the gem
require 'reliefweb-api'

api_instance = ReliefWebAPI::CountriesApi.new

opts = {
  query_value: 'query_value_example', # String | Specify the terms of your fuzzy search. The default is no query.
  query_operator: 'query_operator_example', # String | Specify the operator by which your search query words will be combined.
  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.
  filter_field: 'filter_field_example', # String | Field to filter by. Every condition must contain either a <code>field</code> or <code>conditions</code> property.
  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.
  filter_operator: 'filter_operator_example', # String | Operator by which filters will be combined.
  filter_negate: true, # BOOLEAN | Reverse the filter to include those items that do not match.
  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.
  facets_field: 'facets_field_example', # String | Field to facet by. May include dates, references or the status field.
  facets_name: 'facets_name_example', # String | Identifier for resulting facet data. Useful when faceting multiple ways on the same field.
  facets_limit: 56, # Integer | Limit the number of facets returned for non-date based facets.
  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>.
  facets_filter: ['facets_filter_example'], # Array<String> | Apply all the same capabilities of the filter parameter to the specific results of this facet request.
  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.
  fields_include: ['fields_include_example'], # Array<String> | Specify which fields to include for each item. Defaults to an item label.
  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>.
  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>.
  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>.
  sort: ['sort_example'], # Array<String> | Sort the list results. Defaults to search relevance. Values in the form of <code>fieldname:(asc|desc)</code>.
  profile: 'profile_example', # String | Pre-built standard selections of fields to return for ease of displaying lists or items.
  preset: 'preset_example' # String | Pre-built standard configurations of queries, filters and sorts for common use cases.
}

begin
  #List or search countries covered by ReliefWeb.
  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

ClassMethodHTTP requestDescription
ReliefWebAPI::CountriesApiget_countriesGET /countriesList or search countries covered by ReliefWeb.
ReliefWebAPI::CountriesApiget_country_by_idGET /countries/{countryId}Find country by its unique ID
ReliefWebAPI::CountriesApisearch_countriesPOST /countriesList or search countries covered by ReliefWeb.
ReliefWebAPI::DisastersApiget_disaster_by_idGET /disasters/{disasterId}Find disaster by its unique ID
ReliefWebAPI::DisastersApiget_disastersGET /disastersList or search disasters covered by ReliefWeb.
ReliefWebAPI::DisastersApisearch_disastersPOST /disastersList or search disasters covered by ReliefWeb.
ReliefWebAPI::DiscoveryApidiscovery_resourcesGET /
ReliefWebAPI::DiscoveryApidiscovery_versionsGET /../
ReliefWebAPI::JobsApiget_job_by_idGET /jobs/{jobId}Find job by its unique ID
ReliefWebAPI::JobsApiget_jobsGET /jobsList or search humanitarian job offers.
ReliefWebAPI::JobsApisearch_jobsPOST /jobsList or search humanitarian job offers.
ReliefWebAPI::ReportsApiget_report_by_idGET /reports/{reportId}Find report by its unique ID
ReliefWebAPI::ReportsApiget_reportsGET /reportsList or search updates, headlines or maps.
ReliefWebAPI::ReportsApisearch_reportsPOST /reportsList or search updates, headlines or maps.
ReliefWebAPI::SourcesApiget_source_by_idGET /sources/{sourceId}Find source by its unique ID
ReliefWebAPI::SourcesApiget_sourcesGET /sourcesList or search organizations providing content to ReliefWeb.
ReliefWebAPI::SourcesApisearch_sourcesPOST /sourcesList or search organizations providing content to ReliefWeb.
ReliefWebAPI::TrainingApiget_trainingGET /trainingList or search humanitarian learning opportunities.
ReliefWebAPI::TrainingApiget_training_by_idGET /training/{trainingId}Find training by its unique ID
ReliefWebAPI::TrainingApisearch_trainingPOST /trainingList or search humanitarian learning opportunities.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

FAQs

Package last updated on 04 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc