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

Wrapper for SWTORData.com Api. - Incomplete.

License

Notifications You must be signed in to change notification settings

helloruhe/SWTORSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages