agonyz / php-lexica-art-api
lexica.art API php client
0.0.4
2023-08-01 23:50 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.5
This package is auto-updated.
Last update: 2024-12-01 00:08:41 UTC
README
A simple wrapper for lexica.art API, written in PHP.
Uses Lexica.Art API v1.
Quick Install
composer require agonyz/php-lexica-art-api
Basic usage of php-lexica-art-api client
<?php require_once __DIR__ . '/../vendor/autoload.php'; $client = 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());
From $client
object, you have access to all available lexica.art api endpoints.
Currently only the search
endpoint is supported.