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

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

example/dartactyl_example.dart

import 'package:dartactyl/dartactyl.dart';

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

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

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

  print('Getting Data!');

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

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

  print('Done!');
}
2
likes
0
pub points
9%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

bloc, dio, freezed_annotation, html, json_annotation, meta, retrofit, universal_io

More

Packages that depend on dartactyl