Age-Detector-API

Detector

detectImage


/apitalk/age-detector/image

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/age-detector/image"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DetectorApi;

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

public class DetectorApiExample {

    public static void main(String[] args) {
        
        DetectorApi apiInstance = new DetectorApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        File file = /path/to/file.txt; // File | send image as key file to get age
        try {
            response result = apiInstance.detectImage(apiecoKey, file);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DetectorApi#detectImage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DetectorApi;

public class DetectorApiExample {

    public static void main(String[] args) {
        DetectorApi apiInstance = new DetectorApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        File file = /path/to/file.txt; // File | send image as key file to get age
        try {
            response result = apiInstance.detectImage(apiecoKey, file);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DetectorApi#detectImage");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
File *file = /path/to/file.txt; // send image as key file to get age

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

// 
[apiInstance detectImageWith:apiecoKey
    file:file
              completionHandler: ^(response output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AgeDetectorApi = require('age_detector_api');

var api = new AgeDetectorApi.DetectorApi()

var apiecoKey = apiecoKey_example; // {String} apikey for use API

var file = /path/to/file.txt; // {File} send image as key file to get age


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

namespace Example
{
    public class detectImageExample
    {
        public void main()
        {
            
            var apiInstance = new DetectorApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var file = new File(); // File | send image as key file to get age

            try
            {
                // 
                response result = apiInstance.detectImage(apiecoKey, file);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DetectorApi.detectImage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DetectorApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$file = /path/to/file.txt; // File | send image as key file to get age

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

my $api_instance = WWW::SwaggerClient::DetectorApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $file = /path/to/file.txt; # File | send image as key file to get age

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

# create an instance of the API class
api_instance = swagger_client.DetectorApi()
apiecoKey = apiecoKey_example # String | apikey for use API
file = /path/to/file.txt # File | send image as key file to get age

try: 
    # 
    api_response = api_instance.detect_image(apiecoKey, file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DetectorApi->detectImage: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
file*
File
send image as key file to get age
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error