API Reference
Titan uses SignalR for all client-server communication. There are no HTTP REST endpoints.
Connection
Connect to the SignalR Hubs at the base URL (e.g., https://localhost:12345).
Authentication: Pass the JWT token in the query string: ?access_token=<token>.
Hubs
AccountHub
Endpoint: /accountHub
| Method | Arguments | Returns | Description |
|---|---|---|---|
LoginAsync | string token | AuthResponse | Login/Register with provider token |
GetProfileAsync | - | UserProfile | Get current user profile |
InventoryHub
Endpoint: /inventoryHub
| Method | Arguments | Returns | Description |
|---|---|---|---|
GetInventoryAsync | - | List<Item> | Get all items for current character |
GetItemAsync | Guid itemId | Item | Get specific item details |
TradeHub
Endpoint: /tradeHub
| Method | Arguments | Returns | Description |
|---|---|---|---|
InitiateTradeAsync | Guid targetUserId | TradeSession | Start a new trade |
JoinTradeAsync | Guid tradeId | TradeSession | Join an existing trade |
AddItemAsync | Guid itemId | void | Add item to active trade |
RemoveItemAsync | Guid itemId | void | Remove item |
AcceptTradeAsync | - | TradeStatus | Lock in offer |
CancelTradeAsync | - | void | Cancel trade |
SeasonHub
Endpoint: /seasonHub
| Method | Arguments | Returns | Description |
|---|---|---|---|
GetCurrentSeasonAsync | - | Season | Get active season info |
GetSeasonsAsync | - | List<Season> | List all seasons |
ItemTypeHub
Endpoint: /itemTypeHub
| Method | Arguments | Returns | Description |
|---|---|---|---|
GetAllItemTypesAsync | - | List<ItemType> | Get registry of all items |
Real-Time Events
Clients should subscribe to these events on the respective Hubs.
Trade Events (TradeHub)
| Event | Data | Description |
|---|---|---|
TradeStarted | TradeSession | You have been invited to a trade |
TradeUpdated | TradeSession | Items added/removed or status changed |
TradeCompleted | TradeSession | Trade successful |
TradeCancelled | Guid tradeId | Trade was cancelled |
Season Events (SeasonHub)
| Event | Data | Description |
|---|---|---|
SeasonStarted | Season | A new season has begun |
SeasonEnded | Season | Current season has ended |