COVID-19 Coronavirus Statistics

COVID19

v1StatsPost


/v1/stats

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/corona-statistics/v1/stats?country="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.COVID19Api;

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

public class COVID19ApiExample {

    public static void main(String[] args) {
        
        COVID19Api apiInstance = new COVID19Api();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String country = country_example; // String | Filter stats by URL encoded country. Case-sensitive.
        try {
            inline_response_200 result = apiInstance.v1StatsPost(apiecoKey, country);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling COVID19Api#v1StatsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.COVID19Api;

public class COVID19ApiExample {

    public static void main(String[] args) {
        COVID19Api apiInstance = new COVID19Api();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String country = country_example; // String | Filter stats by URL encoded country. Case-sensitive.
        try {
            inline_response_200 result = apiInstance.v1StatsPost(apiecoKey, country);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling COVID19Api#v1StatsPost");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
String *country = country_example; // Filter stats by URL encoded country. Case-sensitive. (optional) (default to Iran)

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

[apiInstance v1StatsPostWith:apiecoKey
    country:country
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Covid19CoronavirusStatistics = require('covid_19_coronavirus_statistics');

var api = new Covid19CoronavirusStatistics.COVID19Api()

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

var opts = { 
  'country': country_example // {String} Filter stats by URL encoded country. Case-sensitive.
};

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

namespace Example
{
    public class v1StatsPostExample
    {
        public void main()
        {
            
            var apiInstance = new COVID19Api();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
            var country = country_example;  // String | Filter stats by URL encoded country. Case-sensitive. (optional)  (default to Iran)

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

$api_instance = new Swagger\Client\Api\COVID19Api();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$country = country_example; // String | Filter stats by URL encoded country. Case-sensitive.

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

my $api_instance = WWW::SwaggerClient::COVID19Api->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $country = country_example; # String | Filter stats by URL encoded country. Case-sensitive.

eval { 
    my $result = $api_instance->v1StatsPost(apiecoKey => $apiecoKey, country => $country);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling COVID19Api->v1StatsPost: $@\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.COVID19Api()
apiecoKey = apiecoKey_example # String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
country = country_example # String | Filter stats by URL encoded country. Case-sensitive. (optional) (default to Iran)

try: 
    api_response = api_instance.v1_stats_post(apiecoKey, country=country)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling COVID19Api->v1StatsPost: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Query parameters
Name Description
country
String
Filter stats by URL encoded country. Case-sensitive.

Responses

Status: 200 - 200 response