From 60b3f3eef6a0542623c0c28b3a89f2df185d2412 Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Mon, 13 Nov 2023 17:53:42 +0100 Subject: [PATCH] feat: added get categories --- compress/api_category.go | 17 +++++++++-------- compress/compress.go | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/compress/api_category.go b/compress/api_category.go index 202812b..ba273d5 100644 --- a/compress/api_category.go +++ b/compress/api_category.go @@ -7,11 +7,12 @@ package compress * @returns list of categories of the customer */ - - -/** -* -* @param {string} apikey -* @param {string} customer -* @returns list of categories of the customer -*/ \ No newline at end of file +func (o *compress) GetCategories(requestBody categoriesRequest) ([]Category, error) { + // + if errs := validator.Validate(requestBody); errs != nil { + // values not valid, deal with errors here + return errs + } + // + return nil +} diff --git a/compress/compress.go b/compress/compress.go index 11d8a17..6b14094 100644 --- a/compress/compress.go +++ b/compress/compress.go @@ -9,6 +9,7 @@ type ICompress interface { HealthCheck() error IsDebug() bool GetUploads(uploadsPaginated UploadsPaginated) error + GetCategories(requestBody categoriesRequest) ([]Category, error) // } //