PteroDotNet 0.0.2

dotnet add package PteroDotNet --version 0.0.2                
NuGet\Install-Package PteroDotNet -Version 0.0.2                
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="PteroDotNet" Version="0.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PteroDotNet --version 0.0.2                
#r "nuget: PteroDotNet, 0.0.2"                
#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 PteroDotNet as a Cake Addin
#addin nuget:?package=PteroDotNet&version=0.0.2

// Install PteroDotNet as a Cake Tool
#tool nuget:?package=PteroDotNet&version=0.0.2                

<p align=center> <img src="./Documentation/logo_long.png" alt="PteroDotNet"> </p>

Introduction

PteroDotNet is a .NET 5 wrapper for the Pterodactyl Panel API. This library is designed to be easy to use and feature-rich, while also being fully asynchronous. Originally designed for use with Terabit Hosting's Pterodactyl panel, this library is now open-source and available for anyone to use/contribute to.

Features

  • Synchronous and Asynchronous methods. e.g: SomeActionSync()and SomeActionAsync().
  • Both Client & Admin API support through the PteroClient and PteroAdmin classes.

Installation

To install PteroDotNet, you can either download the source code and build it yourself, or you can install it via NuGet.

To install the latest version of PteroDotNet via NuGet, run the following command:

  dotnet add package PteroDotNet

If you want to install a specific version of PteroDotNet, you can specify the version number in the command:

  dotnet add package PteroDotNet --version 1.0.0

Usage

To start using PteroDotNet, you'll first need to create a new instance of the PteroApplication class.

using PteroDotNet;

var application = new PteroApplication("https://panel.example.com", "API_KEY");

Then, use the Init(TokenType tokenType) method to initialize the application with the token type you want to use.

For Client Tokens

using PteroDotNet;

var application = new PteroApplication("https://panel.example.com", "API_KEY");

// Initalize and try to use the token as a client token.
application.Init(TokenType.Client);

For Admin Tokens

using PteroDotNet;

var application = new PteroApplication("https://panel.example.com", "API_KEY");

// Initalize and try to use the token as an admin token.
application.Init(TokenType.Admin);

Depending on your token type, you can now use the PteroClient or PteroAdmin classes to interact with the API.

[!WARNING] If you initialize using TokenType.Client, the PteroAdmin will throw an exception if you try to use it, and vice versa.

Contributing

If you'd like to contribute to PteroDotNet, feel free to fork the repository and submit a pull request. Some features may not be implemented by myself due to the fact that I don't use them, so feel free to add them 😃 We're always looking to improve PteroDotNet, so any contributions are welcome.

Branches

  • release - The latest stable release of PteroDotNet.
  • development - The latest development version of PteroDotNet.
  • staging - branch for testing release candidates before merging into release.

Setting up your IDE

PteroDotNet is designed to be easy to work with. To set up your IDE, follow the steps below:

  • Use GitHub Desktop (Recommended) or Git to clone the repository.
  • Create a branch off the development branch.
  • Open the project in your IDE of choice (Visual Studio, Rider, etc.).
  • Start coding!

Building the project

To build the project, you can use the following commands:

  dotnet build

Creating a pull request

To create a pull request, follow the steps below:

  • Push your changes to your fork.
  • Create a pull request from your fork to the development branch.
  • Wait. We'll try to review your pull request as soon as possible.

License

PteroDotNet is licensed under the BSD 3-Clause License. See the LICENSE file for more information.

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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
0.0.2 67 2/24/2025