dartactyl 1.11.1 copy "dartactyl: ^1.11.1" to clipboard
dartactyl: ^1.11.1 copied to clipboard

An API client wrapper for Pterodactyl Panel. Following V1 for now.

example/dartactyl_example.dart

// ignore_for_file: avoid_print
import 'package:dartactyl/dartactyl.dart';

String panelUrl = 'https://panel.example.com';
String apiKey = '<API-Key>';

void main(List<String> args) async {
  print('Starting!');

  final PteroClient client = PteroClient.generate(
    url: panelUrl,
    apiKey: apiKey,
  );

  print('Getting Data!');

  await client.listServers().then((response) {
    final Server server = response.items[0];
    print('${server.name} : ${server.description}');
  });

  await client.getAccountInfo().then((response) {
    final Account accountInfo = response.attributes;
    print('${accountInfo.username} : ${accountInfo.email}');
  });

  print('Done!');
}
3
likes
100
points
95
downloads

Publisher

unverified uploader

Weekly Downloads

An API client wrapper for Pterodactyl Panel. Following V1 for now.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, dio, fast_immutable_collections, freezed_annotation, html, json_annotation, meta, retrofit, rxdart, universal_io, web_socket_channel

More

Packages that depend on dartactyl