Method: Colrapi.matching

Defined in:
lib/colrapi.rb

.matching(dataset_id, name: nil, authorship: nil, code: nil, rank: nil, within_superkingdom: nil, within_kingdom: nil, within_subkingdom: nil, within_superphylum: nil, within_phylum: nil, within_subphylum: nil, within_superclass: nil, within_class: nil, within_subclass: nil, within_superorder: nil, within_order: nil, within_suborder: nil, within_superfamily: nil, within_family: nil, within_subfamily: nil, within_tribe: nil, within_subtribe: nil, within_genus: nil, within_subgenus: nil, within_section: nil, within_species: nil, verbose: false) ⇒ Array, Boolean

Get names or a name from a dataset

Parameters:

  • dataset_id (String)

    The dataset id

  • name (String) (defaults to: nil)

    The scientific name to match

  • authorship (String) (defaults to: nil)

    The authorship string for the scientific name

  • code (String) (defaults to: nil)

    The nomenclatural code (bacterial, botanical, cultivars, phytosociological, virus, zoological)

  • rank (String) (defaults to: nil)

    The rank of the scientific name

  • within_superkingdom (String) (defaults to: nil)

    Restricts query to within a superkingdom

  • within_kingdom (String) (defaults to: nil)

    Restricts query to within a kingdom

  • within_subkingdom (String) (defaults to: nil)

    Restricts query to within a subkingdom

  • within_superphylum (String) (defaults to: nil)

    Restricts query to within a superphylum

  • within_phylum (String) (defaults to: nil)

    Restricts query to within a phylum

  • within_subphylum (String) (defaults to: nil)

    Restricts query to within a subphylum

  • within_superclass (String) (defaults to: nil)

    Restricts query to within a superclass

  • within_class (String) (defaults to: nil)

    Restricts query to within a class

  • within_subclass (String) (defaults to: nil)

    Restricts query to within a subclass

  • within_superorder (String) (defaults to: nil)

    Restricts query to within a superorder

  • within_order (String) (defaults to: nil)

    Restricts query to within a order

  • within_suborder (String) (defaults to: nil)

    Restricts query to within a suborder

  • within_superfamily (String) (defaults to: nil)

    Restricts query to within a superfamily

  • within_family (String) (defaults to: nil)

    Restricts query to within a family

  • within_subfamily (String) (defaults to: nil)

    Restricts query to within a subfamily

  • within_tribe (String) (defaults to: nil)

    Restricts query to within a tribe

  • within_subtribe (String) (defaults to: nil)

    Restricts query to within a subtribe

  • within_genus (String) (defaults to: nil)

    Restricts query to within a genus

  • within_subgenus (String) (defaults to: nil)

    Restricts query to within a subgenus

  • within_section (String) (defaults to: nil)

    Restricts query to within a section

  • within_species (String) (defaults to: nil)

    Restricts query to within a species

  • verbose (Boolean) (defaults to: false)

    Print headers to STDOUT

Returns:

  • (Array, Boolean)

    An array of hashes



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/colrapi.rb', line 506

def self.matching(dataset_id, name: nil, authorship: nil, code: nil, rank: nil, within_superkingdom: nil,
                  within_kingdom: nil, within_subkingdom: nil, within_superphylum: nil, within_phylum: nil,
                  within_subphylum: nil, within_superclass: nil, within_class: nil, within_subclass: nil,
                  within_superorder: nil, within_order: nil, within_suborder: nil, within_superfamily: nil,
                  within_family: nil, within_subfamily: nil, within_tribe: nil, within_subtribe: nil,
                  within_genus: nil, within_subgenus: nil, within_section: nil, within_species: nil,
                  verbose: false)
  endpoint = "dataset/#{dataset_id}/nameusage/match"
  Request.new(endpoint: endpoint, name: name, authorship: authorship, code: code, rank: rank,
              within_superkingdom: within_superkingdom, within_kingdom: within_kingdom,
              within_subkingdom: within_subkingdom, within_superphylum: within_superphylum,
              within_phylum: within_phylum, within_subphylum: within_subphylum, within_superclass: within_superclass,
              within_class: within_class, within_subclass: within_subclass, within_superorder: within_superorder,
              within_order: within_order, within_suborder: within_suborder, within_superfamily: within_superfamily,
              within_family: within_family, within_subfamily: within_subfamily, within_tribe: within_tribe,
              within_subtribe: within_subtribe, within_genus: within_genus, within_subgenus: within_subgenus,
              within_section: within_section, within_species: within_species, verbose: verbose).perform
end