homebox/frontend/lib/api/classes/assets.ts
2023-07-31 06:05:37 -08:00

11 lines
382 B
TypeScript

import { BaseAPI, route } from "../base";
import { ItemSummary } from "../types/data-contracts";
import { PaginationResult } from "../types/non-generated";
export class AssetsApi extends BaseAPI {
async get(id: string, page = 1, pageSize = 50) {
return await this.http.get<PaginationResult<ItemSummary>>({
url: route(`/assets/${id}`, { page, pageSize }),
});
}
}