homebox/frontend/lib/api/classes/assets.ts

12 lines
392 B
TypeScript
Raw Normal View History

import { BaseAPI, route } from "../base";
2024-03-01 17:21:45 +00:00
import type { ItemSummary } from "../types/data-contracts";
import type { 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 }),
});
}
}