feat: begin implementing getReportsByAppId method

This commit is contained in:
Stevan Freeborn
2023-02-08 16:38:36 +00:00
parent b6605a4275
commit f0aeb51f60
7 changed files with 142 additions and 4 deletions
+18
View File
@@ -306,6 +306,24 @@ export class OnspringClient {
return apiResponse;
}
public async getReportsByAppId(
appId: number,
pagingRequest: PagingRequest = new PagingRequest(1, 50)
) {
const endpoint = EndpointFactory.getReportsByAppIdEndpoint(
appId,
pagingRequest
);
const apiResponse = await this.get<any>(endpoint);
if (apiResponse.isSuccessful === false) {
return apiResponse;
}
return apiResponse.asGetPagedReportsResponseType();
}
/**
* @method get - Makes a GET request to the specified endpoint.
* @param {string} endpoint - The endpoint that will be used to make the request.