Denda Vivas

Image-GIF

API URL:

                    

Method:POST

https://image-gif.denda.ro/api/v1/convert/create-image/<<Api KEY>>

Parametri:

  • gif_width | gif_height : seteaza dimensiunea gif-ului.
    *doar valori numerice.
  • gif_delay: specifica timpul de rendare a imaginilor (secunde)
    *doar valori numerice.
  • gif_quality: calitatea de rendare a gif-ului (min:50 - max:100)
    *doar valori numerice.
  • images: contine sirul de linkuri ale imaginilor necesare creari gif-ului
    *doar https in caz contrar imaginile nu vor fi procesate

Numarul de imagini poate fi convertire este limitat de catre api pentru a preveni posibile blocaje.

                       
                

'Content-Type': 'application/json' { "gif_width" : 400 || 800 || 1000 ..., "gif_height" : 400 || 800 || 1000 ... "youtube" "gif_delay" : 0.5 || 1 || 2 ...(seconds), "gif_quality" : min:50 - max:100, "images" : [ 'https://site.com/image.jpg', 'https://site.com/image.png', 'https://site.com/image.webp' ,.....], }

Fragment de cod:

                        let  header = new Headers();
                        header.append("Content-Type", "application/json");
                        
let data = JSON.stringify({ "gif_width": 400, "gif_height":400, "gif_delay": 1, "gif_quality": 100, "images":[ images url ] });
let options = { method: 'POST', headers: header, body: data, redirect: 'follow' };
fetch("https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>", options) .then(response => response.json()) .then(result => console.log(result)) .catch(error => console.log('error', error));
                        const axios = require('axios');
                        
let data = JSON.stringify({ "gif_width": 400, "gif_height":400, "gif_delay": 1, "gif_quality": 100, "images":[ images url ] });
let config = { method: 'post', url:"https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>", headers: { 'Content-Type': 'application/json' }, data : data };
axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); })
.catch(function (error) { console.log(error); });
                        <?php
                        
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "gif_width":400, "gif_height":400, "gif_delay":0.5, "gif_quality":100, "images":[ images url ] }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), ));
$response = curl_exec($curl); echo '<pre>'; print_r($response); echo '<pre>'; curl_close($curl);
                        let settings = {
                        "url": "https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>",
                        "method": "POST",
                        "timeout": 0,
                        "headers": {
                        "Content-Type": "application/json"
                        },
                        
                        
"data": JSON.stringify({ "gif_width": 400, "gif_height":400, "gif_delay": 1, "gif_quality": 100, "images":[ images url ] }), }
$.ajax(settings).done(function (response) { console.log(response); });

Răspunsul cererilor:

Apare atunci când toate funcțiile sau executat fără problema.

                        {
                            "status":"success",
                            "gif":"https://image-gif.denda.ro/file.gif"
                        }
                    

Apare atunci când nici una dintre imagini nu a trecut de verificarea link-ului.

                        {
                            "status":"failed",
                            "error":"Invalid images"
                        }
                    

Poate fi cauzata de salvarea incorecta a imaginilor.

                        {
                            "status":"failed",
                            "error":"Saved images are incomplete:(error)"
                        }
                    

Poate fi cauzata de o conversie incorecta a imaginilor.

                        {
                            "status":"failed",
                            "error":"Image conversion incomplete:(error)"
                        }
                    

Este cauzata de crearea incorecta a fisierului gif.

                        {
                            "status":"failed",
                            "error":"Error create gif: (error)"
                        }
                    

Apare atunci când sa depasit numarul de imagini permise.

                        {
                            "status":"failed",
                            "error":"The allowed image limit has been exceeded"
                        }
                    

Apare atunci când campurile au valori ce nu sunt acceptate.

                        {
                            "status":"failed",
                            "error":"Invalid field type"
                        }
                    

Campurile nu pot avea valori mai mici sau egale cu 0.

                        {
                            "status":"failed",
                            "error":"Field value can equal or less that 0"
                        }