tshock_server_rest 0.1.0+1 icon indicating copy to clipboard operation
tshock_server_rest: ^0.1.0+1 copied to clipboard

Dart wrapper for TShock REST APIs for Terraria Servers.

tshock_server_rest #

A Dart wrapper for TShock Terraria Servers REST APIs

Getting Started #

TShockServerRESTServer tssr = TShockServerRESTServer.instance;

tssr.init(
  '127.0.0.1',      // server address
  7878,             // server rest api port
  token,            // token created from reast api
  isHttps: false,   // if the address has certificate protocol
);

/// Checks server status
TShockServerStatus status = await tssr.status();

/// retrive all users from the server
final users = await tssr.users.getAllUsers();

Structure #

TShockServerRESTServer has contexts of functionalities

  • Users

  • Bans

  • Players

  • World

  • Groups

Each context has it own REST API functions

TShockServerStatus.instance.

Geral context is just

TShockServerStatus.instance.MyFunctions();

0
likes
90
pub points
0%
popularity

Publisher

verified publisher iconadriankohls.app

Dart wrapper for TShock REST APIs for Terraria Servers.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.Apache-2.0 (LICENSE)

Dependencies

http

More

Packages that depend on tshock_server_rest