BlueDragonFly.PalWorldApiSDK.Core 1.0.2

dotnet add package BlueDragonFly.PalWorldApiSDK.Core --version 1.0.2
                    
NuGet\Install-Package BlueDragonFly.PalWorldApiSDK.Core -Version 1.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="BlueDragonFly.PalWorldApiSDK.Core" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlueDragonFly.PalWorldApiSDK.Core" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="BlueDragonFly.PalWorldApiSDK.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlueDragonFly.PalWorldApiSDK.Core --version 1.0.2
                    
#r "nuget: BlueDragonFly.PalWorldApiSDK.Core, 1.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.
#:package BlueDragonFly.PalWorldApiSDK.Core@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlueDragonFly.PalWorldApiSDK.Core&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=BlueDragonFly.PalWorldApiSDK.Core&version=1.0.2
                    
Install as a Cake Tool

BlueDragonFly Palworld API SDK

NuGet .NET License: MIT

Biblioteca .NET para administrar un servidor Palworld mediante su API REST oficial.

Documentacion

Requisitos

.NET

Instalacion

dotnet add package BlueDragonFly.PalWorldApiSDK.Core

Uso rapido

using BlueDragonFLy.PalWorldApiSDK.Core;

using var client = new PalworldClient(
    new PalworldServerOptions("http://localhost:8212", "admin", "your-password"));

var server = await client.Server.InfoAsync();
await client.World.AnnounceAsync("El servidor se reiniciara pronto.");
await client.Players.BanAsync("steam_00000000000000000", "Incumplimiento de las reglas.");

PalworldServerOptions acepta tanto la URL del servidor como la URL completa de la API y normaliza la ruta a /v1/api. El cliente conserva esta configuracion unicamente en memoria. Para persistirla, el proyecto consumidor puede cargar esos valores desde su propia configuracion JSON o variables de entorno.

Operaciones incluidas

Area Metodos
Servidor Server.InfoAsync, Server.MetricsAsync, Server.SettingsAsync, Server.ShutdownAsync, Server.StopAsync
Mundo World.AnnounceAsync, World.SaveAsync, World.GameDataAsync
Jugadores Players.ListAsync, Players.KickAsync, Players.BanAsync, Players.UnbanAsync

Consulta la guia de uso para la tabla completa de variables, ejemplos de cada operacion y manejo de errores.

Demo

El proyecto BlueDragonFLy.PalWorldApiSDK.Demo es una aplicacion de consola que expone todos los metodos del SDK mediante variables de entorno o un archivo .env:

# Opcion 1: variables de entorno
$env:PALWORLD_SERVER_URL="http://localhost:8212"
$env:PALWORLD_ADMIN_PASSWORD="your-password"
$env:PALWORLD_DEMO_COMMAND="info"
dotnet run --project BlueDragonFLy.PalWorldApiSDK.Demo

# Opcion 2: archivo .env
cp BlueDragonFLy.PalWorldApiSDK.Demo/.env.example BlueDragonFLy.PalWorldApiSDK.Demo/.env
# edita .env con tus valores
dotnet run --project BlueDragonFLy.PalWorldApiSDK.Demo

Ejecuta con PALWORLD_DEMO_COMMAND=help para ver la lista completa de comandos. Ver USAGE.md para los detalles de cada variable.

Tests

dotnet test

Las pruebas verifican la composicion de cada solicitud (metodo HTTP, ruta, autenticacion y cuerpo JSON), la deserializacion de respuestas oficiales, el manejo de errores HTTP y la validacion de parametros. No requieren un servidor real: usan un HttpMessageHandler interno.

Compatibilidad

  • .NET 10 o superior. Consulta docs/PLATFORM.md para mas detalles sobre la plataforma de destino.
  • Servidor Palworld con la API REST habilitada (RESTAPIEnabled=True).
  • El endpoint /v1/api/game-data puede no estar disponible en versiones antiguas del servidor.

Seguridad

La API de Palworld usa Basic Auth y permite acciones administrativas destructivas. Habilita RESTAPIEnabled=True en el servidor y no expongas este endpoint directamente a Internet. Se recomienda usar secretos del entorno, una red privada o un proxy con controles de acceso adicionales.

Licencia

Este proyecto se distribuye bajo la licencia MIT. Copyright (c) 2026 Javier Rivera.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

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.2 156 7/20/2026
1.0.1 118 7/17/2026

Version 1.0.2 Cliente orientado a dominios (PalworldClient) con autenticacion HTTP Basic, modelos tipados para todos los endpoints oficiales documentados, excepciones especificas para 400/401, demo de consola con soporte de archivo .env y documentacion completa de uso y plataforma. Consulta CHANGELOG.md para mas detalles.