Method: Gbif::Species.name_backbone

Defined in:
lib/gbifrb/Species.rb

.name_backbone(name:, rank: nil, kingdom: nil, phylum: nil, clazz: nil, order: nil, family: nil, genus: nil, strict: nil, offset: nil, limit: nil, verbose: nil, options: nil) ⇒ Hash

Search the GBIF taxonomic backbone

Examples:

require 'gbifrb'

species = Gbif::Species
species.name_backbone(name: "Helianthus")
species.name_backbone(name: "Poa")

Parameters:

  • offset (Fixnum) (defaults to: nil)

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

  • limit (Fixnum) (defaults to: nil)

    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

  • name (String)

    Full scientific name potentially with authorship (required)

  • rank (String) (defaults to: nil)

    The rank given as our rank enum. (optional)

  • kingdom (String) (defaults to: nil)

    If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)

  • phylum (String) (defaults to: nil)

    If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)

  • clazz (String) (defaults to: nil)

    If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)

  • order (String) (defaults to: nil)

    If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)

  • family (String) (defaults to: nil)

    If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)

  • genus (String) (defaults to: nil)

    If provided default matching will also try to match against this if no direct match is found for the name alone. (optional)

  • strict (bool) (defaults to: nil)

    If True it (fuzzy) matches only the given name, but never a taxon in the upper classification (optional)

Returns:

[View source]

48
49
50
51
52
53
54
55
56
57
58
# File 'lib/gbifrb/Species.rb', line 48

def self.name_backbone(name:, rank: nil, kingdom: nil, phylum: nil,
  clazz: nil, order: nil, family: nil, genus: nil, strict: nil,
  offset: nil, limit: nil, verbose: nil, options: nil)

  arguments = { name: name, rank: rank, kingdom: kingdom,
          phylum: phylum, class: clazz, order: order,
          family: family, genus: genus, strict: strict,
          offset: offset, limit: limit }.tostrings
  opts = arguments.delete_if { |k, v| v.nil? }
  Request.new("species/match", opts, verbose, options).perform
end