gelbooru 8.0.0
gelbooru: ^8.0.0 copied to clipboard
An Gelbooru API client written in Dart and powered by the `http` package !
An Gelboory API client written in Dart and powered by the http
package !
Compatible with all Dart supported platforms, this package allows you to interact with the Gelbooru API in a more Dart idiomatic way.
Upgrading to >8.0.0 #
From version 8.0.0 and upward, this package will only support Gelbooru and won't be usable to access others booru based imageboard due to API differences being to complex to handle
Features #
- Implements all the #5 endpoints of the Gelbooru API
- No scrapping, all requests are made to the API properly, gently and respecting the API rate limits.
- Use Dart's native
http
package for making requests allowing for using more advanced implementation on the fly.
Getting started #
Run the following command:
# You may also add the http and xml packages for their respective exceptions
$ dart pub add gelbooru
Usage #
import 'package:gelbooru/gelbooru.dart';
Future<void> main() async {
final GelbooruClient client = GelbooruClient();
final PaginatedResponse<Post> posts = await client.posts.index(
request: const PostIndexRequest(
tags: <String?>['blonde', 'toys'],
limit: 5,
),
);
for (final Post p in posts) {
print(p.fileUrl);
}
}
Quirks and sparks #
- The
GelbooruClient
is a stateless object, you can use it as a singleton or create a new instance for each request. - There's no check to see if the API is up or not, if the API is down, the client will throw a
ClientException
from thehttp
package.
No AI project / AI free Project #
Use the project or any parts for any commercial (meaning generating revenue) purposes WITHOUT written authorization from the project owner See the LICENSE file for more details.