servertap-js
Version:
A TypeScript library for working with the ServerTap API
14 lines (12 loc) • 576 B
text/typescript
import { Base } from "../base";
export class Economy extends Base {
pay(uuid: string, amount: number): Promise<string> {
return this.request(`/economy/pay`, { method: "POST", body: `uuid=${uuid}&amount=${amount}` }, "application/x-www-form-urlencoded");
}
debit(uuid: string, amount: number): Promise<string> {
return this.request(`/economy/debit`, { method: "POST", body: `uuid=${uuid}&amount=${amount}` }, "application/x-www-form-urlencoded");
}
economy(): Promise<string> {
return this.request(`/economy`);
}
}