module GfwApiClient

Constants

VERSION

Public Class Methods

find_set(options) click to toggle source
# File lib/gfw_api_client.rb, line 8
def self.find_set(options)

  table_space = options['table_space'] if options['table_space']
  concessions = options['concessions'] if options['concessions']
  country     = options['country']     if options['country']
  region      = options['region']      if options['region']
  start_date  = options['start_date']  if options['start_date']
  end_date    = options['end_date']    if options['end_date']
  date        = options['date']        if options['date']
  wdpa_id     = options['wdpa_id']     if options['wdpa_id']
  use_id      = options['use_id']      if options['use_id']
  type        = options['type']        if options['type']
  geojson     = options['geo_json']    if options['geo_json']
  api_url     = options['api_url']     if options['api_url']

  period = if (start_date && end_date)
             start_date + ',' + end_date
           end

  DataSet.find_set(table_space, concessions, country, region, wdpa_id, use_id, type, period, geojson, api_url) if table_space

end