Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.
vkollinPublic archive

About

A PHP client for trefle.io

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Trefle.io PHP client

This is a client for trefle.io.

Installation

composer require vkollin/trefle-php-client

Usage

$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();

Implemented endpoints

Species

Plants

Genus

Families

DivisionOrders

DivisionClasses

Divisions

Subkingdoms

Kingdoms

About

A PHP client for trefle.io

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages