diff --git a/package.json b/package.json index 0d52606..7045d0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@persian-caesar/hycom-api", - "version": "1.1.0", + "version": "1.1.1", "description": "A package for easy using hycom.ir api service.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/HyCom.ts b/src/HyCom.ts index 65cee9f..767255a 100644 --- a/src/HyCom.ts +++ b/src/HyCom.ts @@ -14,6 +14,24 @@ import { { "success": true, "data": [ + { + "endpoint": "/api/", + "method": "GET", + "description": "Returns this API help documentation.", + "authentication": "None", + "parameters": [], + "example_response": { + "success": true, + "data": [ + { + "endpoint": "/api/", + "method": "GET", + "description": "API help documentation", + "authentication": "None" + } + ] + } + }, { "endpoint": "/api/top-authors/", "method": "GET", @@ -119,6 +137,33 @@ import { } ], "description": "Generates a QR code for the provided URL" + }, + { + "endpoint": "/api/compress-image/", + "method": "POST", + "description": "Compresses an uploaded image with specified quality and format, returning the image file.", + "authentication": "Required (Django session or token)", + "parameters": [ + { + "name": "image", + "type": "file", + "required": true, + "description": "Image file to compress (jpg, jpeg, png, webp)" + }, + { + "name": "quality", + "type": "integer", + "required": false, + "description": "Compression quality (0-10, default: 0)" + }, + { + "name": "format", + "type": "string", + "required": false, + "description": "Output format (jpg, png, webp, default: same as input)" + } + ], + "example_response": "Binary image file" } ] }