PHP code example of agonyz / php-lexica-art-api

1. Go to this page and download the library: Download agonyz/php-lexica-art-api 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/ */

    

agonyz / php-lexica-art-api example snippets




nt = new \LexicaArt\LexicaArtClient();
$images = $client->api('search')->searchImage('keyword');

        /**
         * @var $image ImageObject
         */
        foreach($images as $image) {
            $image->getGallery();
        }

        // explore a given style
        $client->api('search')->searchImage($images[0]->getId());

composer