IMG4Me

Request Example:

https://api.apieco.ir/img4me?text=TEST&font={font}&type={type}&size={font size}&fcolor={font color}&bcolor={background color}

Response Example:

    
      http://img4me.com/WlM3tQ.png
    
  

Text

text to Img

The API will return the URL of the image generated.


/

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/img4me/?text=&fcolor=&bcolor=&type=&size=&font="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TextApi;

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

public class TextApiExample {

    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");

        TextApi apiInstance = new TextApi();
        String text = text_example; // String | Text to be converted into image.
        String apiecoKey = apiecoKey_example; // String | 
        String fcolor = fcolor_example; // String | Font color in HEX.
        String bcolor = bcolor_example; // String | Background color in HEX. Leave empty for transparent background
        String type = type_example; // String | Image format: gif, jpg, png
        String size = size_example; // String | font size
        String font = font_example; // String | Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana
        try {
            apiInstance.text to Img(text, apiecoKey, fcolor, bcolor, type, size, font);
        } catch (ApiException e) {
            System.err.println("Exception when calling TextApi#text to Img");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TextApi;

public class TextApiExample {

    public static void main(String[] args) {
        TextApi apiInstance = new TextApi();
        String text = text_example; // String | Text to be converted into image.
        String apiecoKey = apiecoKey_example; // String | 
        String fcolor = fcolor_example; // String | Font color in HEX.
        String bcolor = bcolor_example; // String | Background color in HEX. Leave empty for transparent background
        String type = type_example; // String | Image format: gif, jpg, png
        String size = size_example; // String | font size
        String font = font_example; // String | Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana
        try {
            apiInstance.text to Img(text, apiecoKey, fcolor, bcolor, type, size, font);
        } catch (ApiException e) {
            System.err.println("Exception when calling TextApi#text to Img");
            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 *text = text_example; // Text to be converted into image.
String *apiecoKey = apiecoKey_example; //  (optional)
String *fcolor = fcolor_example; // Font color in HEX. (optional)
String *bcolor = bcolor_example; // Background color in HEX. Leave empty for transparent background (optional)
String *type = type_example; // Image format: gif, jpg, png (optional)
String *size = size_example; // font size (optional)
String *font = font_example; // Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana (optional)

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

//  The API will return the URL of the image generated.



[apiInstance text to ImgWith:text
    apiecoKey:apiecoKey
    fcolor:fcolor
    bcolor:bcolor
    type:type
    size:size
    font:font
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Img4Me = require('img4_me');
var defaultClient = Img4Me.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 Img4Me.TextApi()

var text = text_example; // {String} Text to be converted into image.

var opts = { 
  'apiecoKey': apiecoKey_example, // {String} 
  'fcolor': fcolor_example, // {String} Font color in HEX.
  'bcolor': bcolor_example, // {String} Background color in HEX. Leave empty for transparent background
  'type': type_example, // {String} Image format: gif, jpg, png
  'size': size_example, // {String} font size
  'font': font_example // {String} Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.text to Img(text, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class text to ImgExample
    {
        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 TextApi();
            var text = text_example;  // String | Text to be converted into image.
            var apiecoKey = apiecoKey_example;  // String |  (optional) 
            var fcolor = fcolor_example;  // String | Font color in HEX. (optional) 
            var bcolor = bcolor_example;  // String | Background color in HEX. Leave empty for transparent background (optional) 
            var type = type_example;  // String | Image format: gif, jpg, png (optional) 
            var size = size_example;  // String | font size (optional) 
            var font = font_example;  // String | Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana (optional) 

            try
            {
                //  The API will return the URL of the image generated.



                apiInstance.text to Img(text, apiecoKey, fcolor, bcolor, type, size, font);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TextApi.text to Img: " + 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\TextApi();
$text = text_example; // String | Text to be converted into image.
$apiecoKey = apiecoKey_example; // String | 
$fcolor = fcolor_example; // String | Font color in HEX.
$bcolor = bcolor_example; // String | Background color in HEX. Leave empty for transparent background
$type = type_example; // String | Image format: gif, jpg, png
$size = size_example; // String | font size
$font = font_example; // String | Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana

try {
    $api_instance->text to Img($text, $apiecoKey, $fcolor, $bcolor, $type, $size, $font);
} catch (Exception $e) {
    echo 'Exception when calling TextApi->text to Img: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TextApi;

# 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::TextApi->new();
my $text = text_example; # String | Text to be converted into image.
my $apiecoKey = apiecoKey_example; # String | 
my $fcolor = fcolor_example; # String | Font color in HEX.
my $bcolor = bcolor_example; # String | Background color in HEX. Leave empty for transparent background
my $type = type_example; # String | Image format: gif, jpg, png
my $size = size_example; # String | font size
my $font = font_example; # String | Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana

eval { 
    $api_instance->text to Img(text => $text, apiecoKey => $apiecoKey, fcolor => $fcolor, bcolor => $bcolor, type => $type, size => $size, font => $font);
};
if ($@) {
    warn "Exception when calling TextApi->text to Img: $@\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.TextApi()
text = text_example # String | Text to be converted into image.
apiecoKey = apiecoKey_example # String |  (optional)
fcolor = fcolor_example # String | Font color in HEX. (optional)
bcolor = bcolor_example # String | Background color in HEX. Leave empty for transparent background (optional)
type = type_example # String | Image format: gif, jpg, png (optional)
size = size_example # String | font size (optional)
font = font_example # String | Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana (optional)

try: 
    #  The API will return the URL of the image generated.



    api_instance.text_to_img(text, apiecoKey=apiecoKey, fcolor=fcolor, bcolor=bcolor, type=type, size=size, font=font)
except ApiException as e:
    print("Exception when calling TextApi->text to Img: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key
String
Query parameters
Name Description
text*
String
Text to be converted into image.
Required
fcolor
String
Font color in HEX.
bcolor
String
Background color in HEX. Leave empty for transparent background
type
String
Image format: gif, jpg, png
size
String
font size
font
String
Font for the image generated. Supported word: arial, comic, dyslexic, georgia, impact, lucida, simsun, tahoma, times, trebuchet, verdana

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input