spw 1.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package spw --version 1.1.2                
NuGet\Install-Package spw -Version 1.1.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="spw" Version="1.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add spw --version 1.1.2                
#r "nuget: spw, 1.1.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 spw as a Cake Addin
#addin nuget:?package=spw&version=1.1.2

// Install spw as a Cake Tool
#tool nuget:?package=spw&version=1.1.2                

SpWorldsApiForCS

Это библиотека C# для управлением API SpWorlds наш github. Документация к API тут.

Как начать?

Подключение библиотеки происходит через nuget

nuget
dotnet add package spw --version 1.1.2

Команды

Примечание

Можно использовать асинхронные и синхронные функции

Директива подключения

using spw;

Создание класса

SpWorlds sp = new SpWorlds("id", "token");

Правильный token и id

await sp.IsSpWalletAsync();
//or
sp.IsSpwallet();

Возвращает bool

Получить баланс

await sp.GetBalanceAsync();
//or
sp.GetBalance();

Возвращает int

Получить никнейм по DiscordId

await sp.GetUserAsync("DiscordId");
//or
sp.GetUser("DiscordId");

Возвращает string

Отправить АРы

await sp.SendPaymentAsync(amount, "receiver", "message");
//or
sp.SendPayment(amount, "receiver", "message");

Возвращает bool

Создать ссылку на оплату

await sp.CreatePaymentAsync(amount, "redirectUrl", "webhookUrl", "data");
//or
sp.CreatePayment(amount, "redirectUrl", "webhookUrl", "data");

Возвращает string

Проверка оплаты

await sp.ValidatorAsync("webhook", "Xbody_hash");
//or
sp.Validator("webhook", "Xbody_hash");

Возвращает bool

Получение uuid mojang

await sp.GetMojangUuid("name")
//or
sp.GetMojangUuid("name")

Возвращает string

Exceptions

BabRequestException

Неправильная форма запроса

UnathorizedException

Неверный token или id

BadGatewayException

Spworlds api отключен

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. 
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
2.1.2 110 5/1/2024
2.1.1 109 4/20/2024
2.1.0 104 4/18/2024
2.0.0 211 1/7/2024
1.1.2 116 1/21/2024
1.1.1 128 1/7/2024
1.1.0 152 10/13/2023
1.0.2 139 9/9/2023
1.0.1 151 9/9/2023 1.0.1 is deprecated because it has critical bugs.
1.0.0 153 9/9/2023 1.0.0 is deprecated because it has critical bugs.