UNPKG

@plattar/plattar-api

Version:

Module for interfacing with the Plattar API (https://www.plattar.com)

22 lines (19 loc) 672 B
import { PlattarServer as Server } from "../../server/plattar-server"; import { PlattarObjectRelations } from "./plattar-object-relations"; export interface RequestOptions { readonly cache: boolean; } export abstract class PlattarObject { constructor(id: string, server: Server); invalidate(): void; get id(): string; get relationships(): PlattarObjectRelations; get attributes(): any; get meta(): any; static include(...args: [any]): [string]; include(...args: [any]): this; get(opt: RequestOptions | undefined = undefined): Promise<this>; update(): Promise<this>; create(): Promise<this>; delete(): Promise<this>; }