Method: Gbif::Species.name_suggest

Defined in:
lib/gbifrb/Species.rb

.name_suggest(q: nil, datasetKey: nil, rank: nil, limit: 100, offset: nil, verbose: nil, options: nil) ⇒ Hash

Search the GBIF suggester

Examples:

require 'gbifrb'

species = Gbif::Species
species.name_suggest(q: "Helianthus")
species.name_suggest(q: "Poa")

Parameters:

  • offset (Fixnum) (defaults to: nil)

    Number of record to start at, any non-negative integer. Default: 0

  • limit (Fixnum) (defaults to: 100)

    Number of results to return. Default: 100

  • verbose (Boolean) (defaults to: nil)

    Print request headers to stdout. Default: false

  • options (Hash) (defaults to: nil)

    Hash of options for configuring the request, passed on to Faraday.new

    • timeout [Fixnum] open/read timeout Integer in seconds

    • open_timeout [Fixnum] read timeout Integer in seconds

    • proxy [Hash] hash of proxy options

      • uri [String] Proxy Server URI

      • user [String] Proxy server username

      • password [String] Proxy server password

    • params_encoder [Hash] not sure what this is

    • bind [Hash] A hash with host and port values

    • boundary [String] of the boundary value

    • oauth [Hash] A hash with OAuth details

  • q (String) (defaults to: nil)

    Simple search parameter. The value for this parameter can be a simple word or a phrase. Wildcards can be added to the simple word parameters only, e.g. ‘q=puma’ (Required)

  • datasetKey (String) (defaults to: nil)

    Filters by the checklist dataset key (a uuid, see examples)

  • rank (String) (defaults to: nil)

    A taxonomic rank. One of ‘class’, ‘cultivar’, ‘cultivar_group’, ‘domain’, ‘family’, ‘form’, ‘genus’, ‘informal’, ‘infrageneric_name’, ‘infraorder’, ‘infraspecific_name’, ‘infrasubspecific_name’, ‘kingdom’, ‘order’, ‘phylum’, ‘section’, ‘series’, ‘species’, ‘strain’, ‘subclass’, ‘subfamily’, ‘subform’, ‘subgenus’, ‘subkingdom’, ‘suborder’, ‘subphylum’, ‘subsection’, ‘subseries’, ‘subspecies’, ‘subtribe’, ‘subvariety’, ‘superclass’, ‘superfamily’, ‘superorder’, ‘superphylum’, ‘suprageneric_name’, ‘tribe’, ‘unranked’, or ‘variety’.

Returns:


83
84
85
86
87
88
89
90
# File 'lib/gbifrb/Species.rb', line 83

def self.name_suggest(q: nil, datasetKey: nil, rank: nil, limit: 100, offset: nil,
  verbose: nil, options: nil)

  arguments = { q: q, datasetKey: datasetKey, rank: rank,
    limit: limit, offset: offset }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("species/suggest", opts, verbose, options).perform
end