captioInmage
Add a caption to an Imgflip meme template. Images created with this API will be publicly accessible by anyone through the url in the response - there is no "private" option. This does not mean these memes will be posted publicly though, one still needs to know the exact URL to find the image. If the image hangs around on Imgflip servers for a while and gets very few views (direct image views and image page views both count), it will be auto-deleted to save space.
/v2/everything
Usage and SDK Samples
curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/imgflip/v2/everything?template_id=&username=&password=&text0=&text1=&font="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CaptionApi;
import java.io.File;
import java.util.*;
public class CaptionApiExample {
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");
CaptionApi apiInstance = new CaptionApi();
String apiecoKey = apiecoKey_example; // String |
String templateId = templateId_example; // String | A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP
String username = username_example; // String | username of a valid imgflip account. This is used to track where API requests are coming from.
String password = password_example; // String | password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url.
String text0 = text0_example; // String | Top text for the meme
String text1 = text1_example; // String | Bottom text for the meme
String font = font_example; // String | [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact.
try {
inline_response_200_1 result = apiInstance.captioInmage(apiecoKey, templateId, username, password, text0, text1, font);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CaptionApi#captioInmage");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CaptionApi;
public class CaptionApiExample {
public static void main(String[] args) {
CaptionApi apiInstance = new CaptionApi();
String apiecoKey = apiecoKey_example; // String |
String templateId = templateId_example; // String | A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP
String username = username_example; // String | username of a valid imgflip account. This is used to track where API requests are coming from.
String password = password_example; // String | password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url.
String text0 = text0_example; // String | Top text for the meme
String text1 = text1_example; // String | Bottom text for the meme
String font = font_example; // String | [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact.
try {
inline_response_200_1 result = apiInstance.captioInmage(apiecoKey, templateId, username, password, text0, text1, font);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CaptionApi#captioInmage");
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 *templateId = templateId_example; // A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP (optional)
String *username = username_example; // username of a valid imgflip account. This is used to track where API requests are coming from. (optional)
String *password = password_example; // password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url. (optional)
String *text0 = text0_example; // Top text for the meme (optional)
String *text1 = text1_example; // Bottom text for the meme (optional)
String *font = font_example; // [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact. (optional)
CaptionApi *apiInstance = [[CaptionApi alloc] init];
[apiInstance captioInmageWith:apiecoKey
templateId:templateId
username:username
password:password
text0:text0
text1:text1
font:font
completionHandler: ^(inline_response_200_1 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ImgflipApi = require('_imgflip_api');
var defaultClient = ImgflipApi.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 ImgflipApi.CaptionApi()
var apiecoKey = apiecoKey_example; // {String}
var opts = {
'templateId': templateId_example, // {String} A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP
'username': username_example, // {String} username of a valid imgflip account. This is used to track where API requests are coming from.
'password': password_example, // {String} password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url.
'text0': text0_example, // {String} Top text for the meme
'text1': text1_example, // {String} Bottom text for the meme
'font': font_example // {String} [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.captioInmage(apiecoKey, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class captioInmageExample
{
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 CaptionApi();
var apiecoKey = apiecoKey_example; // String |
var templateId = templateId_example; // String | A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP (optional)
var username = username_example; // String | username of a valid imgflip account. This is used to track where API requests are coming from. (optional)
var password = password_example; // String | password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url. (optional)
var text0 = text0_example; // String | Top text for the meme (optional)
var text1 = text1_example; // String | Bottom text for the meme (optional)
var font = font_example; // String | [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact. (optional)
try
{
inline_response_200_1 result = apiInstance.captioInmage(apiecoKey, templateId, username, password, text0, text1, font);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CaptionApi.captioInmage: " + 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\CaptionApi();
$apiecoKey = apiecoKey_example; // String |
$templateId = templateId_example; // String | A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP
$username = username_example; // String | username of a valid imgflip account. This is used to track where API requests are coming from.
$password = password_example; // String | password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url.
$text0 = text0_example; // String | Top text for the meme
$text1 = text1_example; // String | Bottom text for the meme
$font = font_example; // String | [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact.
try {
$result = $api_instance->captioInmage($apiecoKey, $templateId, $username, $password, $text0, $text1, $font);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CaptionApi->captioInmage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CaptionApi;
# 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::CaptionApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $templateId = templateId_example; # String | A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP
my $username = username_example; # String | username of a valid imgflip account. This is used to track where API requests are coming from.
my $password = password_example; # String | password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url.
my $text0 = text0_example; # String | Top text for the meme
my $text1 = text1_example; # String | Bottom text for the meme
my $font = font_example; # String | [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact.
eval {
my $result = $api_instance->captioInmage(apiecoKey => $apiecoKey, templateId => $templateId, username => $username, password => $password, text0 => $text0, text1 => $text1, font => $font);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CaptionApi->captioInmage: $@\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.CaptionApi()
apiecoKey = apiecoKey_example # String |
templateId = templateId_example # String | A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP (optional)
username = username_example # String | username of a valid imgflip account. This is used to track where API requests are coming from. (optional)
password = password_example # String | password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url. (optional)
text0 = text0_example # String | Top text for the meme (optional)
text1 = text1_example # String | Bottom text for the meme (optional)
font = font_example # String | [optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact. (optional)
try:
api_response = api_instance.captio_inmage(apiecoKey, templateId=templateId, username=username, password=password, text0=text0, text1=text1, font=font)
pprint(api_response)
except ApiException as e:
print("Exception when calling CaptionApi->captioInmage: %s\n" % e)
Parameters
Name | Description |
---|---|
apieco-key* |
String
Required
|
Name | Description |
---|---|
template_id |
String
A template ID as returned by the get_memes response. Any ID that was ever returned from the get_memes response should work for this parameter. For custom template uploads, the template ID can be found in the memegenerator URL, e.g. https://imgflip.com/memegenerator/14859329/Charlie-Sheen-DERP
|
username |
String
username of a valid imgflip account. This is used to track where API requests are coming from.
|
password |
String
password for the imgflip account. As always, make sure password (and all the other parameters) are in the body of the POST request, not in the request url.
|
text0 |
String
Top text for the meme
|
text1 |
String
Bottom text for the meme
|
font |
String
[optional] The font family to use for the text. Current options are "impact" and "arial". Defaults to impact.
|