Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Latest commit

 

History

History
53 lines (41 loc) · 1.44 KB

README.md

File metadata and controls

53 lines (41 loc) · 1.44 KB

SWTORSharp

Wrapper for SWTORData.com Api.

Installation

From Nuget: PM> Install-Package SWTORSharp

or

  1. Clone the repo or download the zip file.

  2. Build the project and reference the .dll for your own app.

Usage

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}");
}

Requirements

.Net Framework 4.6.2

RestSharp.NetCore

Newtonsoft.Json

Questions?

Your best bet is to create an issue, or you can find me in the SWTORData/C# Discord Servers. I don't bite.

License

Read LICENSE