Wrapper for SWTORData.com Api.
From Nuget:
PM> Install-Package SWTORSharp
or
-
Build the project and reference the
.dll
for your own app.
To use the API, you must have an API key you can get from here
using SWTORSharp.Core;
using System;
try
{
var client = new SWTORClient("apikey");
var item = client.GetItemById(1);
Console.WriteLine(item.DisplayName); //Outputs "Diabolist's Superior Lightsabe"
}
catch (SWTORException ex)
{
//Do whatever.
}
You can also get all items, or search items.
var client = new SWTORClient("apikey");
ItemList list = client.GetItems(query: "Saber"); //Outputs about 2799 items with all pages combined.
foreach (var item in list.Objects)
{
Console.WriteLine($"{item.DisplayName} -- {item.Id} -- {item.Quality.Name}");
}
.Net Framework 4.6.2
RestSharp.NetCore
Newtonsoft.Json
Your best bet is to create an issue, or you can find me in the SWTORData/C# Discord Servers. I don't bite.
Read LICENSE