@extends('admin.layouts.app') {{-- Custom CSS & JS --}} @section('custom-css') @endsection @section('content')
{{-- Error --}} @if ($errors->any()) @endif {{-- Success --}} @if(Session::has("success")) @endif {{-- Failed --}} @if(Session::has("failed")) @endif {{-- For developers --}}
{{-- API Key Section --}}

{{ __('API KEY') }}

{{-- Check API Key --}} @if (Auth::user()->api_key != "")
{{-- API Key --}}

{{ \Illuminate\Support\Str::limit(Auth::user()->api_key, 20, $end='xxxxxxxxxxxxxxxxxxxxxxxxxx') }}

@else

{{ __('Key Not Found') }}

@csrf
@endif
{{-- APIs Documentation --}}

{{ __('API Documentation') }}

{{-- Get optimized images --}}

{{ URL::to('/') }}/api/get-images GET

{{ __('Authorization') }} : YOUR_API_KEY
{{ __('Request Parameters') }}
-
{{ __('Response') }}
{
"status": true,
"overall_optimized_images": 1,
"today": 1,
"today_optimized_size": "13.99kB",
"all_images": [
{
"image_id": "10772022359773",
"name": "Download-WebP-Images-in-Chrome-as-JPG-or-PNG-1.webp",
"width": 1000,
"height": 564,
"url": "https://optimer.s3.ap-south-1.amazonaws.com/files/2/optimize/80178261414838.webp",
"size": 14326,
"created_at": "2023-02-09T12:50:19.000000Z"
}
]
}
{{-- Get media images --}}

{{ URL::to('/') }}/api/get-media GET

{{ __('Authorization') }} : YOUR_API_KEY
{{ __('Request Parameters') }}
-
{{ __('Response') }}
{
"status": true,
"overall_media_images": 1,
"today": 1,
"all_images": [
{
"image_id": "10772022359773",
"name": "Download-WebP-Images-in-Chrome-as-JPG-or-PNG-1.webp",
"width": 1000,
"height": 564,
"url": "https://optimer.s3.ap-south-1.amazonaws.com/files/2/optimize/80178261414838.webp",
"size": 14326,
"created_at": "2023-02-09T12:50:19.000000Z"
}
]
}
{{-- Upload images --}}

{{ URL::to('/') }}/api/upload POST

{{ __('Authorization') }} : YOUR_API_KEY
{{ __('Content-type') }}: form/data
{{ __('Request Parameters') }}

{{ __('Required') }} images[] - Array (File)

{{ __('Required') }} compression_ratio - Integer (Eg: 30)

{{ __('Optional') }} media_upload - String (Eg: true / false)

{{ __('Response') }}
{
"status": true,
"download_url": [
"https://optimer.s3.ap-south-1.amazonaws.com/files/2/optimize/80178261414838.webp"
]
}
{{-- Delete --}}

{{ URL::to('/') }}/api/delete GET

{{ __('Authorization') }} : YOUR_API_KEY
{{ __('Content-type') }}: application/json
{{ __('Request Parameters') }}

{{ __('Required') }} image_id - Array (Eg : ["98515682461707", "98518182369707"])

{{ __('Optional') }} permanent_delete - Boolean (Eg: true / false)

{{ __('Response') }}
{
"status": true,
"delete": [
true,
true
]
}
{{-- Get Single Image --}}

{{ URL::to('/') }}/api/get-single-image GET

{{ __('Authorization') }} : YOUR_API_KEY
{{ __('Content-type') }}: application/json
{{ __('Request Parameters') }}

{{ __('Required') }} image_id - String (Eg : "98515682461707")

{{ __('Response') }}
{
"status": true,
"single_image":
{
"image_id": "10772022359773",
"name": "Download-WebP-Images-in-Chrome-as-JPG-or-PNG-1.webp",
"width": 1000,
"height": 564,
"url": "https://optimer.s3.ap-south-1.amazonaws.com/files/2/optimize/80178261414838.webp",
"size": 14326,
"created_at": "2023-02-09T12:50:19.000000Z"
}
}
{{-- Get check status --}}

{{ URL::to('/') }}/api/check-status GET

{{ __('Authorization') }} : YOUR_API_KEY
{{ __('Request Parameters') }}
-
{{ __('Response') }}
{
"status": true,
"maximum_optimize": "Unlimited",
"available_optimize": "Unlimited",
"current_storage": "20GB",
"used_storage": 0,
"available_storage": "20GB"
}
{{-- Footer --}} @include('admin.includes.footer')
{{-- Custom JS --}} @section('custom-js') @endsection @endsection