AternosAPI 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AternosAPI --version 1.0.0                
NuGet\Install-Package AternosAPI -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AternosAPI" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AternosAPI --version 1.0.0                
#r "nuget: AternosAPI, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AternosAPI as a Cake Addin
#addin nuget:?package=AternosAPI&version=1.0.0

// Install AternosAPI as a Cake Tool
#tool nuget:?package=AternosAPI&version=1.0.0                

AternosAPI

Unofficial aternos.org client to control your server(s).

Example usage:

var aternosClient = new AternosClient("<YOUR ATERNOS TOKEN>");
var success = await aternosClient.PrepareAsync();
if (!success) {
  Console.WriteLine("Failed to fetch ajax token!");
  return;
}

// Auto select server
success = await aternosClient.UpdateServerIdAsync();
if (!success) {
  Console.WriteLine("Failed to update sever id!");
  return;
}

// Start selected server
success = await aternosClient.StartSelectedServerAsync();
if (!success) {
  Console.WriteLine("Failed to start the selected server!");
  return;
}

// Stop selected server
success = await aternosClient.StopSelectedServerAsync();
if (!success) {
  Console.WriteLine("Failed to stop the selected server!");
  return;
}

// Restart selected server
success = await aternosClient.RestartSelectedServerAsync();
if (!success) {
  Console.WriteLine("Failed to restart the selected server!");
  return;
}

// Change a setting (max player count in this example)
success = await aternosClient.ChangeSelectedServerConfigAsync("/server.properties", "max-players", "50");
if (!success) {
  Console.WriteLine("Failed to change config!");
  return;
}

// Get AternosLog instance
var log = await aternosClient.GetSelectedServerLogAsync();
if (log == null) {
  Console.WriteLine("Failed to fetch log object!");
  return;
}

If you want to run the unit tests create a text file called "aternos_token.txt" in your application data directory (%appdata%) with your token inside.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 290 3/27/2023
1.0.5 464 1/14/2022
1.0.4 252 1/13/2022
1.0.3 249 1/7/2022
1.0.2 239 1/7/2022
1.0.1 262 1/7/2022
1.0.0 268 1/4/2022