Nekos.Best Dart

CI Pub Package

A minimal Dart package for interacting with Nekos.best api.

Getting started

Add the package to your project's pubspec.yaml file. You can use the dart cli

$ dart pub add nekos_best

Usage

Import the package in your dart file and use the methods

import 'package:nekos_best/nekos_best.dart' as nb;

var res = nb.fetch(endpoint: 'neko');

Classes

Detailed documentation can be found in the Package API Reference. There is also examples on general usage of the package in the Official Nekos.Best docs.

The package exports a Client class and a fetch method. The fetch method uses the Client classes Client.fetch method internally. The client class has other two methods, a search method and a fetchFile method.

All possible usages are listed in details in the example/ directory.

Response

There are two classes: NBResponse & NBBufferResponse. They have the following fields. Refer to the officials nekos.best docs for more info.

class NBResponse {
  final String url;
  final String? artist_href;
  final String? artist_name;
  final String? source_url;
  final String? anime_name;
}

class NBBufferResponse {
  final List<int> data;
  final String? artist_href;
  final String? artist_name;
  final String? source_url;
  final String? anime_name;
}

You can access the fields with dot notation i.e.

var neko_url = neko.url; // neko is an instance of NBResponse

See example/structs_example.dart for more.

Author

nekos_best_dart © Yakiyo. Authored and maintained by Yakiyo.

Released under MIT License

Libraries

nekos_best
A minimal package to interact with nekos.best api