Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class DataCallbacks
import { DataCallbacks } from "https://deno.land/x/sptaki@1.2.0/callbacks/mod.ts";

Handle client requests

Constructors

new
DataCallbacks(
httpResponse: HttpResponseUtil,
databaseServer: DatabaseServer,
ragfairController: RagfairController,
hideoutController: HideoutController,
)

Properties

protected
databaseServer: DatabaseServer
protected
hideoutController: HideoutController
protected
httpResponse: HttpResponseUtil
protected
ragfairController: RagfairController

Methods

getGlobals(
url: string,
sessionID: string,
): IGetBodyResponseData<IGlobals>

Handle client/globals

getHideoutAreas(
url: string,
sessionID: string,
): IGetBodyResponseData<IHideoutArea[]>

Handle client/hideout/settings

Handle client/items/prices/ Called when viewing a traders assorts TODO - fully implement this

getLocalesGlobal(
url: string,
sessionID: string,
): string

Handle client/locale

getLocalesLanguages(
url: string,
sessionID: string,
): IGetBodyResponseData<Record<string, string>>

Handle client/languages

getLocalesMenu(
url: string,
sessionID: string,
): IGetBodyResponseData<string>

Handle client/menu/locale

getQteList(
url: string,
sessionID: string,
): string

Handle client/hideout/qte/list

getSettings(
url: string,
sessionID: string,
): IGetBodyResponseData<ISettingsBase>

Handle client/settings

getTemplateCharacter(
url: string,
sessionID: string,
): IGetBodyResponseData<string[]>

Handle client/account/customization

Handle client/handbook/templates

getTemplateItems(
url: string,
sessionID: string,
): string

Handle client/items

getTemplateSuits(
url: string,
sessionID: string,
): IGetBodyResponseData<Record<string, ICustomizationItem>>

Handle client/customization