Skip to content

omnilab/itis API reference

Floor
Provider · Omnilab
Version
1.x
Conformance suite
not wired
Verified for real
Its README does not say
Licence
MIT
composer require omnilab/itis:1.x-dev

Read from the package's own PHP files at the commit 10151d030aa3: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Omnilab\Itis

  • ItisSource class

    ITIS, the Integrated Taxonomic Information System (USGS and its partners), through its JSON web service (www.itis.gov/ITISWebService/jsonservice): a taxon by its TSN or its exact scientific name - its name and authority, rank, usage (valid, invalid, accepted, not accepted) and why, its accepted name, its hierarchy, its common names, its geographic divisions and jurisdictional origins, ITIS's credibility rating; its parent, accepted name, synonyms and children as related things. A search of scientific and common names.

    5 methods · 2 constants

  • ItisSourceFactory class

    ITIS: taxa by TSN or name, their hierarchy, usage, synonyms and common names, and a search of names - no key needed.

    4 options

Omnilab\Itis

ItisSource class

final class ItisSource extends HttpSource ItisSource.php:33

ITIS, the Integrated Taxonomic Information System (USGS and its partners), through its JSON web service (www.itis.gov/ITISWebService/jsonservice): a taxon by its TSN or its exact scientific name - its name and authority, rank, usage (valid, invalid, accepted, not accepted) and why, its accepted name, its hierarchy, its common names, its geographic divisions and jurisdictional origins, ITIS's credibility rating; its parent, accepted name, synonyms and children as related things. A search of scientific and common names.

No key, no published rate. ITIS writes its JSON in ISO-8859-1 (its content type says so): the source reads it as such. An unknown TSN is an empty answer (200), read as null.

const BASE_URI = 'https://www.itis.gov/ITISWebService/jsonservice/'
const MAX_PER_PAGE = 100

The most a page of a search holds (ITIS's pageSize).

ItisSource::__construct()

public function __construct(HttpClientInterface $http, readonly bool $hierarchy = true, readonly ?string $language = 'English', string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)
$hierarchy

entity() asks for the hierarchy too (a second call): the lineage and the children

$language

the common names kept first ("English"); null: ITIS's order

ItisSource::getName()

public function getName(): string

ItisSource::capabilities()

public function capabilities(): array

ItisSource::entity()

public function entity(Identifier|string $id): ?Entity

A taxon by its TSN (180438, itis:180438, tsn:180438, its LSID, its report page) or its exact scientific name (Delphinus delphis): the record as ITIS keeps it - an invalid name is itself, its accepted name related. Two calls (one without the hierarchy), three for a name.

public function search(Query $query): Page

ITIS's search of its scientific and common names (searchForAnyMatchPaged), in alphabetical order, page by number; a taxon matched by several of its names comes once a page. The total (getAnyMatchCount, a call) on the first page. A domain other than taxonomy answers nothing.

ItisSourceFactory class

final class ItisSourceFactory extends SourceFactory ItisSourceFactory.php:21

ITIS: taxa by TSN or name, their hierarchy, usage, synonyms and common names, and a search of names - no key needed.

options: mailto: 'support@glitchr.io' # in the User-Agent hierarchy: true # entity() asks for the hierarchy too (a second call) language: English # the common names put first; null: ITIS's order throttle: 0 # seconds between two calls: ITIS publishes no rate base_uri: 'https://www.itis.gov/ITISWebService/jsonservice/'

Options

OptionDefault
hierarchytrue
language'English'
throttle0.0
base_uriItisSource::BASE_URI