Programming Quotes API

ProtectedRoutes

voteQuote

vote a quote

vote a quote


/quotes/vote

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/prog-quotes/quotes/vote?quoteId=&newVote="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProtectedRoutesApi;

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

public class ProtectedRoutesApiExample {

    public static void main(String[] args) {
        
        ProtectedRoutesApi apiInstance = new ProtectedRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String quoteId = quoteId_example; // String | The Quote id
        BigDecimal newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)
        try {
            inline_response_200 result = apiInstance.voteQuote(apiecoKey, quoteId, newVote);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProtectedRoutesApi#voteQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProtectedRoutesApi;

public class ProtectedRoutesApiExample {

    public static void main(String[] args) {
        ProtectedRoutesApi apiInstance = new ProtectedRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String quoteId = quoteId_example; // String | The Quote id
        BigDecimal newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)
        try {
            inline_response_200 result = apiInstance.voteQuote(apiecoKey, quoteId, newVote);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProtectedRoutesApi#voteQuote");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *quoteId = quoteId_example; // The Quote id
BigDecimal *newVote = 8.14; // Vote Value (from 1 to 5)

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

// vote a quote
[apiInstance voteQuoteWith:apiecoKey
    quoteId:quoteId
    newVote:newVote
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.ProtectedRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var quoteId = quoteId_example; // {String} The Quote id

var newVote = 8.14; // {BigDecimal} Vote Value (from 1 to 5)


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

namespace Example
{
    public class voteQuoteExample
    {
        public void main()
        {
            
            var apiInstance = new ProtectedRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var quoteId = quoteId_example;  // String | The Quote id
            var newVote = 8.14;  // BigDecimal | Vote Value (from 1 to 5)

            try
            {
                // vote a quote
                inline_response_200 result = apiInstance.voteQuote(apiecoKey, quoteId, newVote);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProtectedRoutesApi.voteQuote: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProtectedRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$quoteId = quoteId_example; // String | The Quote id
$newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)

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

my $api_instance = WWW::SwaggerClient::ProtectedRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $quoteId = quoteId_example; # String | The Quote id
my $newVote = 8.14; # BigDecimal | Vote Value (from 1 to 5)

eval { 
    my $result = $api_instance->voteQuote(apiecoKey => $apiecoKey, quoteId => $quoteId, newVote => $newVote);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProtectedRoutesApi->voteQuote: $@\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.ProtectedRoutesApi()
apiecoKey = apiecoKey_example # String | 
quoteId = quoteId_example # String | The Quote id
newVote = 8.14 # BigDecimal | Vote Value (from 1 to 5)

try: 
    # vote a quote
    api_response = api_instance.vote_quote(apiecoKey, quoteId, newVote)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProtectedRoutesApi->voteQuote: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
quoteId*
String
The Quote id
Required
newVote*
BigDecimal
Vote Value (from 1 to 5)
Required

Responses

Status: 200 - Successful


PublicRoutes

allQuotes

get all quotes

get all quotes


/quotes

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/prog-quotes/quotes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicRoutesApi;

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

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        try {
            array[inline_response_200] result = apiInstance.allQuotes(apiecoKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#allQuotes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicRoutesApi;

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        try {
            array[inline_response_200] result = apiInstance.allQuotes(apiecoKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#allQuotes");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 

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

// get all quotes
[apiInstance allQuotesWith:apiecoKey
              completionHandler: ^(array[inline_response_200] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.PublicRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 


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

namespace Example
{
    public class allQuotesExample
    {
        public void main()
        {
            
            var apiInstance = new PublicRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 

            try
            {
                // get all quotes
                array[inline_response_200] result = apiInstance.allQuotes(apiecoKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicRoutesApi.allQuotes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicRoutesApi();
$apiecoKey = apiecoKey_example; // String | 

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

my $api_instance = WWW::SwaggerClient::PublicRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 

eval { 
    my $result = $api_instance->allQuotes(apiecoKey => $apiecoKey);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicRoutesApi->allQuotes: $@\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.PublicRoutesApi()
apiecoKey = apiecoKey_example # String | 

try: 
    # get all quotes
    api_response = api_instance.all_quotes(apiecoKey)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicRoutesApi->allQuotes: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Successful


quoteByID

get quote by id

get quote by id


/quotes/id/{id}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/prog-quotes/quotes/id/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicRoutesApi;

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

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String id = id_example; // String | The Quote id
        try {
            inline_response_200 result = apiInstance.quoteByID(apiecoKey, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#quoteByID");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicRoutesApi;

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String id = id_example; // String | The Quote id
        try {
            inline_response_200 result = apiInstance.quoteByID(apiecoKey, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#quoteByID");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *id = id_example; // The Quote id

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

// get quote by id
[apiInstance quoteByIDWith:apiecoKey
    id:id
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.PublicRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var id = id_example; // {String} The Quote id


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

namespace Example
{
    public class quoteByIDExample
    {
        public void main()
        {
            
            var apiInstance = new PublicRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var id = id_example;  // String | The Quote id

            try
            {
                // get quote by id
                inline_response_200 result = apiInstance.quoteByID(apiecoKey, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicRoutesApi.quoteByID: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$id = id_example; // String | The Quote id

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

my $api_instance = WWW::SwaggerClient::PublicRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $id = id_example; # String | The Quote id

eval { 
    my $result = $api_instance->quoteByID(apiecoKey => $apiecoKey, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicRoutesApi->quoteByID: $@\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.PublicRoutesApi()
apiecoKey = apiecoKey_example # String | 
id = id_example # String | The Quote id

try: 
    # get quote by id
    api_response = api_instance.quote_by_id(apiecoKey, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicRoutesApi->quoteByID: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The Quote id
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Successful


quotesByLang

get quotes by language

get quotes by language


/quotes/lang/{language}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/prog-quotes/quotes/lang/{language}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicRoutesApi;

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

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String language = language_example; // String | Suported languages: en, sr.
        try {
            array[inline_response_200_1] result = apiInstance.quotesByLang(apiecoKey, language);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#quotesByLang");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicRoutesApi;

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String language = language_example; // String | Suported languages: en, sr.
        try {
            array[inline_response_200_1] result = apiInstance.quotesByLang(apiecoKey, language);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#quotesByLang");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *language = language_example; // Suported languages: en, sr.

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

// get quotes by language
[apiInstance quotesByLangWith:apiecoKey
    language:language
              completionHandler: ^(array[inline_response_200_1] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.PublicRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var language = language_example; // {String} Suported languages: en, sr.


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

namespace Example
{
    public class quotesByLangExample
    {
        public void main()
        {
            
            var apiInstance = new PublicRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var language = language_example;  // String | Suported languages: en, sr.

            try
            {
                // get quotes by language
                array[inline_response_200_1] result = apiInstance.quotesByLang(apiecoKey, language);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicRoutesApi.quotesByLang: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$language = language_example; // String | Suported languages: en, sr.

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

my $api_instance = WWW::SwaggerClient::PublicRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $language = language_example; # String | Suported languages: en, sr.

eval { 
    my $result = $api_instance->quotesByLang(apiecoKey => $apiecoKey, language => $language);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicRoutesApi->quotesByLang: $@\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.PublicRoutesApi()
apiecoKey = apiecoKey_example # String | 
language = language_example # String | Suported languages: en, sr.

try: 
    # get quotes by language
    api_response = api_instance.quotes_by_lang(apiecoKey, language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicRoutesApi->quotesByLang: %s\n" % e)

Parameters

Path parameters
Name Description
language*
String
Suported languages: en, sr.
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Successful


quotesByPage

get quotes by page)

get quotes by page)


/quotes/page/{pageNumber}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/prog-quotes/quotes/page/{pageNumber}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicRoutesApi;

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

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String pageNumber = pageNumber_example; // String | Page Number
        try {
            array[inline_response_200] result = apiInstance.quotesByPage(apiecoKey, pageNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#quotesByPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicRoutesApi;

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String pageNumber = pageNumber_example; // String | Page Number
        try {
            array[inline_response_200] result = apiInstance.quotesByPage(apiecoKey, pageNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#quotesByPage");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *pageNumber = pageNumber_example; // Page Number

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

// get quotes by page)
[apiInstance quotesByPageWith:apiecoKey
    pageNumber:pageNumber
              completionHandler: ^(array[inline_response_200] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.PublicRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var pageNumber = pageNumber_example; // {String} Page Number


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

namespace Example
{
    public class quotesByPageExample
    {
        public void main()
        {
            
            var apiInstance = new PublicRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var pageNumber = pageNumber_example;  // String | Page Number

            try
            {
                // get quotes by page)
                array[inline_response_200] result = apiInstance.quotesByPage(apiecoKey, pageNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicRoutesApi.quotesByPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$pageNumber = pageNumber_example; // String | Page Number

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

my $api_instance = WWW::SwaggerClient::PublicRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $pageNumber = pageNumber_example; # String | Page Number

eval { 
    my $result = $api_instance->quotesByPage(apiecoKey => $apiecoKey, pageNumber => $pageNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicRoutesApi->quotesByPage: $@\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.PublicRoutesApi()
apiecoKey = apiecoKey_example # String | 
pageNumber = pageNumber_example # String | Page Number

try: 
    # get quotes by page)
    api_response = api_instance.quotes_by_page(apiecoKey, pageNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicRoutesApi->quotesByPage: %s\n" % e)

Parameters

Path parameters
Name Description
pageNumber*
String
Page Number
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Successful


randomQuote

get random quote

get random quote


/quotes/random

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/prog-quotes/quotes/random"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicRoutesApi;

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

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String pageNumber = pageNumber_example; // String | Page Number
        try {
            inline_response_200 result = apiInstance.randomQuote(apiecoKey, pageNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#randomQuote");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicRoutesApi;

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String pageNumber = pageNumber_example; // String | Page Number
        try {
            inline_response_200 result = apiInstance.randomQuote(apiecoKey, pageNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#randomQuote");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *pageNumber = pageNumber_example; // Page Number

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

// get random quote
[apiInstance randomQuoteWith:apiecoKey
    pageNumber:pageNumber
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.PublicRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var pageNumber = pageNumber_example; // {String} Page Number


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

namespace Example
{
    public class randomQuoteExample
    {
        public void main()
        {
            
            var apiInstance = new PublicRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var pageNumber = pageNumber_example;  // String | Page Number

            try
            {
                // get random quote
                inline_response_200 result = apiInstance.randomQuote(apiecoKey, pageNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicRoutesApi.randomQuote: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$pageNumber = pageNumber_example; // String | Page Number

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

my $api_instance = WWW::SwaggerClient::PublicRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $pageNumber = pageNumber_example; # String | Page Number

eval { 
    my $result = $api_instance->randomQuote(apiecoKey => $apiecoKey, pageNumber => $pageNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicRoutesApi->randomQuote: $@\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.PublicRoutesApi()
apiecoKey = apiecoKey_example # String | 
pageNumber = pageNumber_example # String | Page Number

try: 
    # get random quote
    api_response = api_instance.random_quote(apiecoKey, pageNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicRoutesApi->randomQuote: %s\n" % e)

Parameters

Path parameters
Name Description
pageNumber*
String
Page Number
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Successful


randomQuotesByLang

get random quote by language

get random quote by language


/quotes/random/lang/{language}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/prog-quotes/quotes/random/lang/{language}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicRoutesApi;

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

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String language = language_example; // String | Suported languages: en, sr.
        try {
            inline_response_200_1 result = apiInstance.randomQuotesByLang(apiecoKey, language);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#randomQuotesByLang");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicRoutesApi;

public class PublicRoutesApiExample {

    public static void main(String[] args) {
        PublicRoutesApi apiInstance = new PublicRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String language = language_example; // String | Suported languages: en, sr.
        try {
            inline_response_200_1 result = apiInstance.randomQuotesByLang(apiecoKey, language);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicRoutesApi#randomQuotesByLang");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *language = language_example; // Suported languages: en, sr.

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

// get random quote by language
[apiInstance randomQuotesByLangWith:apiecoKey
    language:language
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ProgrammingQuotesApi = require('programming_quotes_api');

var api = new ProgrammingQuotesApi.PublicRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var language = language_example; // {String} Suported languages: en, sr.


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

namespace Example
{
    public class randomQuotesByLangExample
    {
        public void main()
        {
            
            var apiInstance = new PublicRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var language = language_example;  // String | Suported languages: en, sr.

            try
            {
                // get random quote by language
                inline_response_200_1 result = apiInstance.randomQuotesByLang(apiecoKey, language);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicRoutesApi.randomQuotesByLang: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$language = language_example; // String | Suported languages: en, sr.

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

my $api_instance = WWW::SwaggerClient::PublicRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $language = language_example; # String | Suported languages: en, sr.

eval { 
    my $result = $api_instance->randomQuotesByLang(apiecoKey => $apiecoKey, language => $language);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicRoutesApi->randomQuotesByLang: $@\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.PublicRoutesApi()
apiecoKey = apiecoKey_example # String | 
language = language_example # String | Suported languages: en, sr.

try: 
    # get random quote by language
    api_response = api_instance.random_quotes_by_lang(apiecoKey, language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicRoutesApi->randomQuotesByLang: %s\n" % e)

Parameters

Path parameters
Name Description
language*
String
Suported languages: en, sr.
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Successful