desu-project / danbooru-sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP SDK for Danbooru.
0.12.1
2020-04-14 18:05 UTC
Requires
- php: 7.3.*
- ext-curl: *
- ext-json: *
- desu-project/chanbooru-interface: ^0.12.0
- psr/simple-cache: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: 2.16.1
- phpstan/phpstan: 0.11.19
This package is auto-updated.
Last update: 2020-06-21 14:26:01 UTC
README
It's collection of entities, value objects and simple client to work with Danbooru API in read-only mode. This SDK implements desu-project/chanbooru-interface.
Installation
composer require desu-project/danbooru-sdk
Getting started
require 'vendor/autoload.php'; use DesuProject\DanbooruSdk\Client; use DesuProject\DanbooruSdk\Post; $client = new Client( 'abc', // api key false // false = use Danbooru instead of Safebooru ); $posts = Post::search( $client, // Client object ['animal_ears'], // array of tags 1, // page number 30 // posts per page ); foreach ($posts as $post) { echo $post->getId() . '<br>' . "\n"; }
For details see sources. They are well documented.