This is a client for trefle.io.
composer require vkollin/trefle-php-client$trefleClient = TrefleClient::create('your-token');
// get a specific species
$sunflowerSpecies = $trefleClient->getSpecies('helianthus-annuus')->getSpecies();
// get a specific plant
$sunflowerPlant = $trefleClient->getPlant('helianthus-annuus')->getPlant();
// search for species matching a query
$searchRequest = (new SearchRequest())->setQuery('oak')->setLimit(5);
$searchResults = $trefleClient->searchSpecies($searchRequest)->getSpecies();- List species
- Retrieve a species
- Search for species (only query parameters and limit is implemented at the moment, but no filters)
- Report an error