dartactyl 1.1.5 copy "dartactyl: ^1.1.5" to clipboard
dartactyl: ^1.1.5 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.getServers().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
points
197
downloads

Publisher

unverified uploader

Weekly Downloads

An API client for Pterodactyl Panel

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

built_value, cookie_jar, dio, dio_cookie_manager, json_annotation, retrofit

More

Packages that depend on dartactyl