Skip to content

SHTCGClient.ClientService

github-actions[bot] edited this page Mar 9, 2026 · 3 revisions

ClientService Class

The main service for interacting with the Something Happened TCG API.

public class ClientService : System.IAsyncDisposable

Inheritance System.Object 🡒 ClientService

Implements System.IAsyncDisposable

Fields
LoggedIn If the client is logged in or not
Methods
AddDeckCard(int, int) Add a card to a deck
DeleteDeckCard(int, int) Delete a card in a deck
DisposeAsync() Async disposal. Put the ClientService in an "await using" block for this to automatically clean up.
EquipCompanion(int) Equip a companion by ID
GetActiveCompanion() Get the user's currently active companion
GetCandles(int, int, int) Get the candle graph for an exchange
GetCards() Get the User's owned cards. (This automatically de-paginates the request and gets all cards.)
GetCompanions() Get the user's owned companions
GetCurrentSeason() Get the currently active season
GetDeckCards(int) Get the cards for a deck by id
GetDecks() Get the user's decks
GetExchanges() Get the currently running exchanges
GetFriends() Get your friends
GetLeaderboard() Get the deck leaderboard for the current season
GetPositions() Get the user's positions in the exchanges
GetSeason(int) Get season by id
GetUserByName(string) Search for a user by name
GetVendors() Get the current vendors
Login(Credentials) Log in to the game
Login(string, string) Log in to the game
Request(HttpMethod, string) A helper method for sending a request to the API
Request(HttpMethod, string, object) A helper method for sending a request to the API
Request<T>(HttpMethod, string) A helper method for sending a request to the API
Request<T>(HttpMethod, string, object) A helper method for sending a request to the API
Roll() Roll for a card
RollHistory(int) Get the last x rolls
SellCard(int, int) Sell a card
SellCards(int[], int) Sell cards
Status() Get the current roll status
UnequipCompanion() Unequip the currently active companion

Clone this wiki locally