From 4186350f7e4746de13107f107cadf00c11f987cd Mon Sep 17 00:00:00 2001 From: Guilherme Werner Date: Fri, 2 Aug 2024 10:18:29 -0300 Subject: [PATCH] Update api.ts --- src/api.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/api.ts b/src/api.ts index dca2615..9bd6d0c 100644 --- a/src/api.ts +++ b/src/api.ts @@ -447,13 +447,13 @@ export class TribufuApi { } /** - * Get packages from the Tribufu API. + * Get files from the Tribufu API. * @param page - * @returns Package[] + * @returns File[] */ - public async getPackages(page: number = 1): Promise { + public async getFiles(page: number = 1): Promise { const headers = this.getHeaders(); - const responseBody = await this.http.get(`/v1/packages?page=${page}`, headers); + const responseBody = await this.http.get(`/v1/files?page=${page}`, headers); if (!responseBody) { return []; @@ -463,13 +463,13 @@ export class TribufuApi { } /** - * Get a package by id from the Tribufu API. + * Get a file by id from the Tribufu API. * @param id - * @returns Package | null + * @returns File | null */ - public async getPackageById(id: string): Promise { + public async getFileById(id: string): Promise { const headers = this.getHeaders() - const responseBody = await this.http.get(`/v1/packages/${id}`, headers); + const responseBody = await this.http.get(`/v1/files/${id}`, headers); if (!responseBody) { return null;