Actions
dev #1307
openAPI Integration for Customize Page - All Routes
Start date:
11/25/2024
Due date:
11/26/2024 (about 17 months late)
% Done:
100%
Estimated time:
7:00 h
Spent time:
Description
Description:
We need to integrate the API for the "Customize" page to handle the following routes:
-
Route 1:
/v2/image-based- Description: Endpoint for image-based compression.
- Functionality: Send and receive image data, applying the compression logic based on the "Edit Image" mode.
-
Route 2:
/v2/with-validation/level-based-with-image- Description: Endpoint for compression with validation, including image retention.
- Functionality: Compress files while retaining images, checking the size and validation based on selected parameters.
-
Route 3:
/v2/with-validation/level-based-without-image- Description: Endpoint for compression with validation, without retaining images.
- Functionality: Compress files with validation, excluding images.
Task Breakdown:
-
API Request:
- Implement HTTP requests for the three routes based on user selection.
- Ensure correct headers and parameters are sent for each request.
- Handle responses and errors appropriately.
-
Data Flow:
- Fetch selected compression mode and settings from the "Customize" page.
- Implement logic to send selected files and size parameters (retrieved from
size_provider) to the appropriate route. - Ensure file data is correctly serialized and sent as part of the API call.
Acceptance Criteria:
- API requests for all three routes work seamlessly.
- Files are compressed according to the selected settings.
- The response is handled appropriately for each route.
Actions