dartactyl 1.3.9-dev.0 copy "dartactyl: ^1.3.9-dev.0" to clipboard
dartactyl: ^1.3.9-dev.0 copied to clipboard

outdated

An API client for Pterodactyl Panel

example/dartactyl_example.dart

import 'package:dartactyl/dartactyl.dart';

final 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) {
    User accountInfo = response.attributes;
    print('${accountInfo.username} : ${accountInfo.email}');
  });

  print('Done!');
}
3
likes
0
pub points
16%
popularity

Publisher

unverified uploader

An API client for Pterodactyl Panel

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, html, json_annotation, retrofit

More

Packages that depend on dartactyl