Pagepeeker API Documentation

ShootThumbnail

shootThumbnail

Issues a reset API call if refresh is set to 1. Else it will download if the image is ready (see endpoint 2.)


/thumbs.php

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/page-peeker/thumbs.php?size=&url=&refres="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ShootThumbnailApi;

import java.io.File;
import java.util.*;

public class ShootThumbnailApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        ShootThumbnailApi apiInstance = new ShootThumbnailApi();
        String apiecoKey = apiecoKey_example; // String | 
        String size = size_example; // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
        String url = url_example; // String | The URL to generate the thumbnail from
        String refres = refres_example; // String | This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1
        try {
            array[inline_response_200] result = apiInstance.shootThumbnail(apiecoKey, size, url, refres);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShootThumbnailApi#shootThumbnail");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ShootThumbnailApi;

public class ShootThumbnailApiExample {

    public static void main(String[] args) {
        ShootThumbnailApi apiInstance = new ShootThumbnailApi();
        String apiecoKey = apiecoKey_example; // String | 
        String size = size_example; // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
        String url = url_example; // String | The URL to generate the thumbnail from
        String refres = refres_example; // String | This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1
        try {
            array[inline_response_200] result = apiInstance.shootThumbnail(apiecoKey, size, url, refres);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShootThumbnailApi#shootThumbnail");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *size = size_example; // t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
String *url = url_example; // The URL to generate the thumbnail from
String *refres = refres_example; // This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1 (optional)

ShootThumbnailApi *apiInstance = [[ShootThumbnailApi alloc] init];

// 
[apiInstance shootThumbnailWith:apiecoKey
    size:size
    url:url
    refres:refres
              completionHandler: ^(array[inline_response_200] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PagepeekerApiDocumentation = require('pagepeeker_api_documentation');
var defaultClient = PagepeekerApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new PagepeekerApiDocumentation.ShootThumbnailApi()

var apiecoKey = apiecoKey_example; // {String} 

var size = size_example; // {String} t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels

var url = url_example; // {String} The URL to generate the thumbnail from

var opts = { 
  'refres': refres_example // {String} This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.shootThumbnail(apiecoKey, size, url, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class shootThumbnailExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new ShootThumbnailApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var size = size_example;  // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
            var url = url_example;  // String | The URL to generate the thumbnail from
            var refres = refres_example;  // String | This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1 (optional) 

            try
            {
                // 
                array[inline_response_200] result = apiInstance.shootThumbnail(apiecoKey, size, url, refres);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShootThumbnailApi.shootThumbnail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\ShootThumbnailApi();
$apiecoKey = apiecoKey_example; // String | 
$size = size_example; // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
$url = url_example; // String | The URL to generate the thumbnail from
$refres = refres_example; // String | This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1

try {
    $result = $api_instance->shootThumbnail($apiecoKey, $size, $url, $refres);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShootThumbnailApi->shootThumbnail: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ShootThumbnailApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ShootThumbnailApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $size = size_example; # String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
my $url = url_example; # String | The URL to generate the thumbnail from
my $refres = refres_example; # String | This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1

eval { 
    my $result = $api_instance->shootThumbnail(apiecoKey => $apiecoKey, size => $size, url => $url, refres => $refres);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ShootThumbnailApi->shootThumbnail: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ShootThumbnailApi()
apiecoKey = apiecoKey_example # String | 
size = size_example # String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
url = url_example # String | The URL to generate the thumbnail from
refres = refres_example # String | This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1 (optional)

try: 
    # 
    api_response = api_instance.shoot_thumbnail(apiecoKey, size, url, refres=refres)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ShootThumbnailApi->shootThumbnail: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
size*
String
t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
Required
url*
String
The URL to generate the thumbnail from
Required
refres
String
This parameter forces the currently generate d thumbnail to be regenerated. It is optional and will be ignored unless it contains the value 1

Responses

Status: 200 - Successful

Status: 405 - Invalid input


ThumbnailReady

thumbnailReady

Poll this API until it returns that the image is available. If available, you can download through endpoint 1. Rendering an image depends largely on how fast a particular web page is loaded (and if it contains Flash). Average waiting time is around 20 - 60 seconds


/thumbs_ready.php

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/page-peeker/thumbs_ready.php?size=&url="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ThumbnailReadyApi;

import java.io.File;
import java.util.*;

public class ThumbnailReadyApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        ThumbnailReadyApi apiInstance = new ThumbnailReadyApi();
        String apiecoKey = apiecoKey_example; // String | 
        Integer id = 56; // Integer | 
        String size = size_example; // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
        String url = url_example; // String | The URL to generate the thumbnail from
        try {
            inline_response_200_1 result = apiInstance.thumbnailReady(apiecoKey, id, size, url);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThumbnailReadyApi#thumbnailReady");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ThumbnailReadyApi;

public class ThumbnailReadyApiExample {

    public static void main(String[] args) {
        ThumbnailReadyApi apiInstance = new ThumbnailReadyApi();
        String apiecoKey = apiecoKey_example; // String | 
        Integer id = 56; // Integer | 
        String size = size_example; // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
        String url = url_example; // String | The URL to generate the thumbnail from
        try {
            inline_response_200_1 result = apiInstance.thumbnailReady(apiecoKey, id, size, url);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThumbnailReadyApi#thumbnailReady");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
Integer *id = 56; // 
String *size = size_example; // t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
String *url = url_example; // The URL to generate the thumbnail from

ThumbnailReadyApi *apiInstance = [[ThumbnailReadyApi alloc] init];

// 
[apiInstance thumbnailReadyWith:apiecoKey
    id:id
    size:size
    url:url
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PagepeekerApiDocumentation = require('pagepeeker_api_documentation');
var defaultClient = PagepeekerApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new PagepeekerApiDocumentation.ThumbnailReadyApi()

var apiecoKey = apiecoKey_example; // {String} 

var id = 56; // {Integer} 

var size = size_example; // {String} t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels

var url = url_example; // {String} The URL to generate the thumbnail from


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thumbnailReady(apiecoKey, id, size, url, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thumbnailReadyExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new ThumbnailReadyApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var id = 56;  // Integer | 
            var size = size_example;  // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
            var url = url_example;  // String | The URL to generate the thumbnail from

            try
            {
                // 
                inline_response_200_1 result = apiInstance.thumbnailReady(apiecoKey, id, size, url);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ThumbnailReadyApi.thumbnailReady: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\ThumbnailReadyApi();
$apiecoKey = apiecoKey_example; // String | 
$id = 56; // Integer | 
$size = size_example; // String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
$url = url_example; // String | The URL to generate the thumbnail from

try {
    $result = $api_instance->thumbnailReady($apiecoKey, $id, $size, $url);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThumbnailReadyApi->thumbnailReady: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ThumbnailReadyApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ThumbnailReadyApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $id = 56; # Integer | 
my $size = size_example; # String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
my $url = url_example; # String | The URL to generate the thumbnail from

eval { 
    my $result = $api_instance->thumbnailReady(apiecoKey => $apiecoKey, id => $id, size => $size, url => $url);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThumbnailReadyApi->thumbnailReady: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ThumbnailReadyApi()
apiecoKey = apiecoKey_example # String | 
id = 56 # Integer | 
size = size_example # String | t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
url = url_example # String | The URL to generate the thumbnail from

try: 
    # 
    api_response = api_instance.thumbnail_ready(apiecoKey, id, size, url)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThumbnailReadyApi->thumbnailReady: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
size*
String
t = Tiny, 90 x 68 pixels; s= Small, 120 x 90 pixels; m = Medium, 200 x 150 pixels; l = Large, 400 x 300 pixels; x = Extra large, 480 x 360 pixels
Required
url*
String
The URL to generate the thumbnail from
Required

Responses

Status: 200 - Successful

Status: 405 - Invalid input