Unofficial asynchronous library written in .NET Framework that interacts with AutoBuy.IO API
This library uses the latest autobuy API (https://api.autobuy.io) To find your API key, just go to your shop settings!
var autobuy = new API("Your API Key");
- Get All Orders:
var allOrders = await autobuy.GetOrdersAsync(page: 1);
foreach (var i in allOrders.orders)
{
Console.WriteLine(i.email);
}
- Get specific order:
var orderInfo = await autobuy.GetOrderAsync(IDOrder: "Order ID");
Console.WriteLine(orderInfo.isComplete);
Console.WriteLine(orderInfo.email);
Console.WriteLine(orderInfo.gateway);
Console.WriteLine(orderInfo.ipAddress);
(...)
- Get all products:
var pr = await autobuy.GetProductsAsync();
foreach (var i in pr.products)
{
Console.WriteLine(i.name);
Console.WriteLine(i.price);
(...)
}
- Get specific products:
var infoProduct = await autobuy.GetProductAsync(IDProduct: "ID Product");
Console.WriteLine(infoProduct.name);
Console.WriteLine(infoProduct.price);
(...)
- Create product:
var productInfo = new ProductInfo()
{
Name = "Name Product",
BlockProxy = false,
Description = "Description Product",
Price = 9.99,
ProductType = ProductType.SerialNumber,
Serials = "test1,test2",
StockDelimiter = ",",
PurchaseMax = 10000,
PurchaseMin = 1,
Unlisted = false
};
var productCreate = await autobuy.CreateProductAsync(productInfo);
Console.WriteLine(productCreate.id);
- Delete product:
await autobuy.DeleteProduct(IDProduct: "");
- Get all projects:
var Init = new Autobuy.License.Projects();
var List = await Init.GetAllProjectsAsync();
foreach (var i in List.projects)
{
Console.WriteLine(i.name);
Console.WriteLine(i.version);
Console.WriteLine(i.licenseCount);
Console.WriteLine(i.id);
}
- Get specific project:
var Init = new Autobuy.License.Projects();
var projectInfo = await Init.GetProjectInfoAsync(IDProject: "ID Project");
Console.WriteLine(projectInfo.Id);
Console.WriteLine(projectInfo.IsBan);
Console.WriteLine(projectInfo.ProjectVersion);
(...)
- Initialize
var control = new Licensing(projectID: "Project ID", projectName: "Project Name");
- Create licenses
var licenseInfo = new LicenseInfo()
{
Email = "Email@email.com",
ExpireDate = DateTime.UtcNow
};
var newLice = await control.CreateLicenseAsync(licenseInfo);
Console.WriteLine(newLice.id); // license key
- Delete license
await control.DeleteLicenseAsync("license key");
- Verify HWID:
bool sameHWID = await control.verifyHwidAsync("license key")
- Login:
bool logIn = await control.AuthKeyAsync(licenseKey: licenseKey)
Any bug or problem, let me know and I will update.