GamePowerX.KekUploadServerApi 1.0.0-alpha3

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

// Install GamePowerX.KekUploadServerApi as a Cake Tool
#tool nuget:?package=GamePowerX.KekUploadServerApi&version=1.0.0-alpha3&prerelease                

KekUploadServerApi - Plugin API for KekUploadServer in C#

How to use

1. Create a new project

Create a new project in your IDE or with the dotnet CLI.

2. Add the KekUploadServerApi package

Add the KekUploadServerApi package to your project.

dotnet CLI
dotnet add package GamePowerX.KekUploadServerApi
NuGet Package Manager
Install-Package GamePowerX.KekUploadServerApi

3. Create a new class

Create a new class that implements the IPlugin interface.

using KekUploadServerApi;
using Microsoft.Extensions.Logging;

namespace TestPlugin;

public class TestPlugin : IPlugin
{
    private IKekUploadServer _server = null!;
    private ILogger<TestPlugin> _logger = null!;

    public Task Load(IKekUploadServer server)
    {
        _server = server;
        _logger = _server.GetPluginLogger<TestPlugin>();
        return Task.CompletedTask;
    }

    public Task Start()
    {
        _logger.LogInformation("TestPlugin started!");
        return Task.CompletedTask;
    }

    public Task Unload()
    {
        _logger.LogInformation("TestPlugin unloaded!");
        return Task.CompletedTask;
    }

    PluginInfo IPlugin.Info => new()
    {
        Name = "TestPlugin",
        Version = "1.0.0-test",
        Author = "GamePowerX",
        Description = "A test plugin for KekUploadServer"
    };

    public void TestMethod()
    {
        _logger.LogInformation("TestPlugin.TestMethod() called!");
    }
}

4. Build the project

Build the project with your IDE or with the dotnet CLI.

5. Copy the plugin dll file into the plugins folder

Copy the plugin dll file into the plugins folder of your KekUploadServer installation.

6. Start the server

Start the server and check the console output for errors.

7. Enjoy your plugin

The plugin should now be loaded and you can use it.

Dependency support

You can add dependencies to your plugin by specifying them in the PluginInfo class.

PluginInfo IPlugin.Info => new() {
       Name = "AnotherTestPlugin",
       Version = "1.0.0-test",
       Author = "GamePowerX",
       Description = "Another test plugin for KekUploadServer",
       Dependencies = new[]{"TestPlugin"}
    };

Contribute

You can contribute to this project by creating a pull request or by creating an issue.

License

This project is licensed under the MIT license. See the LICENSE file for more information.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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.0-alpha3 434 8/2/2023
1.0.0-alpha2 93 7/30/2023
1.0.0-alpha1 87 7/28/2023

Release alpha 3, added KekUploadDummyServer