Project

General

Profile

Actions

dev #1307

open

API Integration for Customize Page - All Routes

Added by Ayat Rahman over 1 year ago. Updated over 1 year ago.

Status:
Pending
Priority:
High
Assignee:
Target version:
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:

  1. 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.
  2. 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.
  3. 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:

  1. 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.
  2. 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

Also available in: Atom PDF