https://github.com/violinist-dev/danbooru-sdk
Danbooru PHP SDK
https://github.com/violinist-dev/danbooru-sdk
Last synced: about 1 year ago
JSON representation
Danbooru PHP SDK
- Host: GitHub
- URL: https://github.com/violinist-dev/danbooru-sdk
- Owner: violinist-dev
- License: mit
- Created: 2018-08-25T01:48:36.000Z (almost 8 years ago)
- Default Branch: dev
- Last Pushed: 2019-02-17T18:30:09.000Z (over 7 years ago)
- Last Synced: 2025-02-15T02:15:30.786Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Danbooru PHP SDK
[](https://travis-ci.org/desu-project/danbooru-sdk)
[](https://packagist.org/packages/desu-project/danbooru-sdk)
[](https://packagist.org/packages/desu-project/danbooru-sdk)
It's collection of entities, value objects and simple client to work with [Danbooru API](https://danbooru.donmai.us/wiki_pages/43568) in read-only mode. This SDK implements [desu-project/chanbooru-interface](https://github.com/desu-project/chanbooru-interface).
## Installation
````
composer require desu-project/danbooru-sdk
````
## Getting started
````php
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() . '
' . "\n";
}
````
For details see sources. They are well documented.
## License
Danbooru SDK is licensed under MIT license. For further details see [LICENSE](LICENSE) file.