Public Holiday API Documentation

PublicHolidays

publicHolidays

Public Holidays

Returns the public holidays from a given year and country.


/{Year}/{CountryCode}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/public-holiday/{Year}/{CountryCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PublicHolidaysApi;

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

public class PublicHolidaysApiExample {

    public static void main(String[] args) {
        
        PublicHolidaysApi apiInstance = new PublicHolidaysApi();
        String apiecoKey = apiecoKey_example; // String | 
        String countryCode = countryCode_example; // String | CountryCode
        String year = year_example; // String | Year
        try {
            inline_response_200 result = apiInstance.publicHolidays(apiecoKey, countryCode, year);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicHolidaysApi#publicHolidays");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PublicHolidaysApi;

public class PublicHolidaysApiExample {

    public static void main(String[] args) {
        PublicHolidaysApi apiInstance = new PublicHolidaysApi();
        String apiecoKey = apiecoKey_example; // String | 
        String countryCode = countryCode_example; // String | CountryCode
        String year = year_example; // String | Year
        try {
            inline_response_200 result = apiInstance.publicHolidays(apiecoKey, countryCode, year);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicHolidaysApi#publicHolidays");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *countryCode = countryCode_example; // CountryCode
String *year = year_example; // Year

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

// Public Holidays
[apiInstance publicHolidaysWith:apiecoKey
    countryCode:countryCode
    year:year
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PublicHolidayApiDocumentation = require('public_holiday_api_documentation');

var api = new PublicHolidayApiDocumentation.PublicHolidaysApi()

var apiecoKey = apiecoKey_example; // {String} 

var countryCode = countryCode_example; // {String} CountryCode

var year = year_example; // {String} Year


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

namespace Example
{
    public class publicHolidaysExample
    {
        public void main()
        {
            
            var apiInstance = new PublicHolidaysApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var countryCode = countryCode_example;  // String | CountryCode
            var year = year_example;  // String | Year

            try
            {
                // Public Holidays
                inline_response_200 result = apiInstance.publicHolidays(apiecoKey, countryCode, year);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PublicHolidaysApi.publicHolidays: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PublicHolidaysApi();
$apiecoKey = apiecoKey_example; // String | 
$countryCode = countryCode_example; // String | CountryCode
$year = year_example; // String | Year

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

my $api_instance = WWW::SwaggerClient::PublicHolidaysApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $countryCode = countryCode_example; # String | CountryCode
my $year = year_example; # String | Year

eval { 
    my $result = $api_instance->publicHolidays(apiecoKey => $apiecoKey, countryCode => $countryCode, year => $year);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicHolidaysApi->publicHolidays: $@\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.PublicHolidaysApi()
apiecoKey = apiecoKey_example # String | 
countryCode = countryCode_example # String | CountryCode
year = year_example # String | Year

try: 
    # Public Holidays
    api_response = api_instance.public_holidays(apiecoKey, countryCode, year)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicHolidaysApi->publicHolidays: %s\n" % e)

Parameters

Path parameters
Name Description
CountryCode*
String
CountryCode
Required
Year*
String
Year
Required
Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - successfull