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
|