PHP code example of dkdimitrov / wscapi

1. Go to this page and download the library: Download dkdimitrov/wscapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dkdimitrov / wscapi example snippets




$wsc = new Wsc\Wsc\WscApi('yourApiKeyString');

$wsc->fetchSpecies('049542');


        'providers' => [
		// [...]
                Wsc\Wsc\WscServiceProvider::class,
        ],

        WSC_API_KEY=yourApiKeyString

$wsc->fetchFamily('0037');

$wsc->fetchGenus('01824');

$wsc->fetchSpecies('049542');


$species = $wsc->fetchSpecies('016759');

if($species->taxon->status == 'SYNONYM' || $species->taxon->status == 'HOMONYM_REPLACED'){
    $valid = $wsc->fetchValidTaxon($species->validTaxon->_href)
}



$wsc->fetchUpdatedTaxa(null, 'YYYY-MM-DD');

$wsc->fetchUpdatedTaxa('species');

$wsc->fetchUpdatedTaxa('species', 'YYYY-MM-DD');