blood_alcohol_api

Calculate

calculateAlcohol

Return the amount of alcohol (in gramm) contained in a drink. Given a drink with a volume (ml) containing percent (vol/vol) alcohol.


/apitalk/blood-alcohol-api/calculate_alcohol/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/calculate_alcohol/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer percent = 56; // Integer | your percent
        Integer volume = 56; // Integer | your volume
        try {
            result result = apiInstance.calculateAlcohol(apiecoKey, percent, volume);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#calculateAlcohol");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer percent = 56; // Integer | your percent
        Integer volume = 56; // Integer | your volume
        try {
            result result = apiInstance.calculateAlcohol(apiecoKey, percent, volume);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#calculateAlcohol");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
Integer *percent = 56; // your percent
Integer *volume = 56; // your volume

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

// Return the amount of alcohol (in gramm) contained in a drink.
Given a drink with a volume (ml) containing percent (vol/vol) alcohol.
[apiInstance calculateAlcoholWith:apiecoKey
    percent:percent
    volume:volume
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var percent = 56; // {Integer} your percent

var volume = 56; // {Integer} your volume


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

namespace Example
{
    public class calculateAlcoholExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var percent = 56;  // Integer | your percent
            var volume = 56;  // Integer | your volume

            try
            {
                // Return the amount of alcohol (in gramm) contained in a drink.
Given a drink with a volume (ml) containing percent (vol/vol) alcohol.
                result result = apiInstance.calculateAlcohol(apiecoKey, percent, volume);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.calculateAlcohol: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$percent = 56; // Integer | your percent
$volume = 56; // Integer | your volume

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

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $percent = 56; # Integer | your percent
my $volume = 56; # Integer | your volume

eval { 
    my $result = $api_instance->calculateAlcohol(apiecoKey => $apiecoKey, percent => $percent, volume => $volume);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->calculateAlcohol: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
percent = 56 # Integer | your percent
volume = 56 # Integer | your volume

try: 
    # Return the amount of alcohol (in gramm) contained in a drink.
Given a drink with a volume (ml) containing percent (vol/vol) alcohol.
    api_response = api_instance.calculate_alcohol(apiecoKey, percent, volume)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->calculateAlcohol: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
percent*
Integer
your percent
Required
volume*
Integer
your volume
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error


calculateBodyWater

Return the amount of water (in liter) in a persons body. For a person with age (years), weight (kg) and height (cm), using the formular for “female body types” if sex is true.


/apitalk/blood-alcohol-api/calculate_body_water/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/calculate_body_water/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        try {
            result result = apiInstance.calculateBodyWater(apiecoKey, age, weight, height, sex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#calculateBodyWater");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        try {
            result result = apiInstance.calculateBodyWater(apiecoKey, age, weight, height, sex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#calculateBodyWater");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
Integer *age = 56; // your age
Integer *weight = 56; // your weight
Integer *height = 56; // your height
String *sex = sex_example; // True or False

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

// Return the amount of water (in liter) in a persons body.
For a person with age (years), weight (kg) and height (cm), using the formular for “female body types” if sex is true.
[apiInstance calculateBodyWaterWith:apiecoKey
    age:age
    weight:weight
    height:height
    sex:sex
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var age = 56; // {Integer} your age

var weight = 56; // {Integer} your weight

var height = 56; // {Integer} your height

var sex = sex_example; // {String} True or False


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

namespace Example
{
    public class calculateBodyWaterExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var age = 56;  // Integer | your age
            var weight = 56;  // Integer | your weight
            var height = 56;  // Integer | your height
            var sex = sex_example;  // String | True or False

            try
            {
                // Return the amount of water (in liter) in a persons body.
For a person with age (years), weight (kg) and height (cm), using the formular for “female body types” if sex is true.
                result result = apiInstance.calculateBodyWater(apiecoKey, age, weight, height, sex);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.calculateBodyWater: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$age = 56; // Integer | your age
$weight = 56; // Integer | your weight
$height = 56; // Integer | your height
$sex = sex_example; // String | True or False

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

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $age = 56; # Integer | your age
my $weight = 56; # Integer | your weight
my $height = 56; # Integer | your height
my $sex = sex_example; # String | True or False

eval { 
    my $result = $api_instance->calculateBodyWater(apiecoKey => $apiecoKey, age => $age, weight => $weight, height => $height, sex => $sex);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->calculateBodyWater: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
age = 56 # Integer | your age
weight = 56 # Integer | your weight
height = 56 # Integer | your height
sex = sex_example # String | True or False

try: 
    # Return the amount of water (in liter) in a persons body.
For a person with age (years), weight (kg) and height (cm), using the formular for “female body types” if sex is true.
    api_response = api_instance.calculate_body_water(apiecoKey, age, weight, height, sex)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->calculateBodyWater: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
age*
Integer
your age
Required
weight*
Integer
your weight
Required
height*
Integer
your height
Required
sex*
String
True or False
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error


calculateDegradation

Return the alcohol degeneration (in gramm) over time. For a person with weight (in kg) over the given minutes.


/apitalk/blood-alcohol-api/calculate_degradation/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/calculate_degradation/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String minutes = minutes_example; // String | your minutes
        String weight = weight_example; // String | your weight
        try {
            result result = apiInstance.calculateDegradation(apiecoKey, minutes, weight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#calculateDegradation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String minutes = minutes_example; // String | your minutes
        String weight = weight_example; // String | your weight
        try {
            result result = apiInstance.calculateDegradation(apiecoKey, minutes, weight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#calculateDegradation");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
String *minutes = minutes_example; // your minutes
String *weight = weight_example; // your weight

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

// Return the alcohol degeneration (in gramm) over time. For a person with weight (in kg) over the given minutes.
[apiInstance calculateDegradationWith:apiecoKey
    minutes:minutes
    weight:weight
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var minutes = minutes_example; // {String} your minutes

var weight = weight_example; // {String} your weight


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

namespace Example
{
    public class calculateDegradationExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var minutes = minutes_example;  // String | your minutes
            var weight = weight_example;  // String | your weight

            try
            {
                // Return the alcohol degeneration (in gramm) over time. For a person with weight (in kg) over the given minutes.
                result result = apiInstance.calculateDegradation(apiecoKey, minutes, weight);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.calculateDegradation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$minutes = minutes_example; // String | your minutes
$weight = weight_example; // String | your weight

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

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $minutes = minutes_example; # String | your minutes
my $weight = weight_example; # String | your weight

eval { 
    my $result = $api_instance->calculateDegradation(apiecoKey => $apiecoKey, minutes => $minutes, weight => $weight);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->calculateDegradation: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
minutes = minutes_example # String | your minutes
weight = weight_example # String | your weight

try: 
    # Return the alcohol degeneration (in gramm) over time. For a person with weight (in kg) over the given minutes.
    api_response = api_instance.calculate_degradation(apiecoKey, minutes, weight)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->calculateDegradation: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
minutes*
String
your minutes
Required
weight*
String
your weight
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error


getBloodAlcoholContent

Returns the Blood Alcohol Content (raise) for a person (described by the given attributes) after a drink containing volume ml of alcohol with the given percent (vol/vol).


/apitalk/blood-alcohol-api/get_blood_alcohol_content/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/get_blood_alcohol_content/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        Integer volume = 56; // Integer | your volume
        Integer percent = 56; // Integer | your percent
        try {
            result result = apiInstance.getBloodAlcoholContent(apiecoKey, age, weight, height, sex, volume, percent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#getBloodAlcoholContent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        Integer volume = 56; // Integer | your volume
        Integer percent = 56; // Integer | your percent
        try {
            result result = apiInstance.getBloodAlcoholContent(apiecoKey, age, weight, height, sex, volume, percent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#getBloodAlcoholContent");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
Integer *age = 56; // your age
Integer *weight = 56; // your weight
Integer *height = 56; // your height
String *sex = sex_example; // True or False
Integer *volume = 56; // your volume
Integer *percent = 56; // your percent

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

// Returns the Blood Alcohol Content (raise) for a person (described by the given attributes) after a drink containing volume ml of alcohol with the given percent (vol/vol).
[apiInstance getBloodAlcoholContentWith:apiecoKey
    age:age
    weight:weight
    height:height
    sex:sex
    volume:volume
    percent:percent
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var age = 56; // {Integer} your age

var weight = 56; // {Integer} your weight

var height = 56; // {Integer} your height

var sex = sex_example; // {String} True or False

var volume = 56; // {Integer} your volume

var percent = 56; // {Integer} your percent


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

namespace Example
{
    public class getBloodAlcoholContentExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var age = 56;  // Integer | your age
            var weight = 56;  // Integer | your weight
            var height = 56;  // Integer | your height
            var sex = sex_example;  // String | True or False
            var volume = 56;  // Integer | your volume
            var percent = 56;  // Integer | your percent

            try
            {
                // Returns the Blood Alcohol Content (raise) for a person (described by the given attributes) after a drink containing volume ml of alcohol with the given percent (vol/vol).
                result result = apiInstance.getBloodAlcoholContent(apiecoKey, age, weight, height, sex, volume, percent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.getBloodAlcoholContent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$age = 56; // Integer | your age
$weight = 56; // Integer | your weight
$height = 56; // Integer | your height
$sex = sex_example; // String | True or False
$volume = 56; // Integer | your volume
$percent = 56; // Integer | your percent

try {
    $result = $api_instance->getBloodAlcoholContent($apiecoKey, $age, $weight, $height, $sex, $volume, $percent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateApi->getBloodAlcoholContent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateApi;

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $age = 56; # Integer | your age
my $weight = 56; # Integer | your weight
my $height = 56; # Integer | your height
my $sex = sex_example; # String | True or False
my $volume = 56; # Integer | your volume
my $percent = 56; # Integer | your percent

eval { 
    my $result = $api_instance->getBloodAlcoholContent(apiecoKey => $apiecoKey, age => $age, weight => $weight, height => $height, sex => $sex, volume => $volume, percent => $percent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->getBloodAlcoholContent: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
age = 56 # Integer | your age
weight = 56 # Integer | your weight
height = 56 # Integer | your height
sex = sex_example # String | True or False
volume = 56 # Integer | your volume
percent = 56 # Integer | your percent

try: 
    # Returns the Blood Alcohol Content (raise) for a person (described by the given attributes) after a drink containing volume ml of alcohol with the given percent (vol/vol).
    api_response = api_instance.get_blood_alcohol_content(apiecoKey, age, weight, height, sex, volume, percent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->getBloodAlcoholContent: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
age*
Integer
your age
Required
weight*
Integer
your weight
Required
height*
Integer
your height
Required
sex*
String
True or False
Required
volume*
Integer
your volume
Required
percent*
Integer
your percent
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error


getDegradation

Returns the alcohol degradation (per mill) of a person with the given stats in the given number of minutes.


/apitalk/blood-alcohol-api/get_degradation/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/get_degradation/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        Integer minutes = 56; // Integer | your minutes
        try {
            result result = apiInstance.getDegradation(apiecoKey, age, weight, height, sex, minutes);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#getDegradation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        Integer minutes = 56; // Integer | your minutes
        try {
            result result = apiInstance.getDegradation(apiecoKey, age, weight, height, sex, minutes);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#getDegradation");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
Integer *age = 56; // your age
Integer *weight = 56; // your weight
Integer *height = 56; // your height
String *sex = sex_example; // True or False
Integer *minutes = 56; // your minutes

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

// Returns the alcohol degradation (per mill) of a person with the given stats in the given number of minutes.
[apiInstance getDegradationWith:apiecoKey
    age:age
    weight:weight
    height:height
    sex:sex
    minutes:minutes
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var age = 56; // {Integer} your age

var weight = 56; // {Integer} your weight

var height = 56; // {Integer} your height

var sex = sex_example; // {String} True or False

var minutes = 56; // {Integer} your minutes


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

namespace Example
{
    public class getDegradationExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var age = 56;  // Integer | your age
            var weight = 56;  // Integer | your weight
            var height = 56;  // Integer | your height
            var sex = sex_example;  // String | True or False
            var minutes = 56;  // Integer | your minutes

            try
            {
                // Returns the alcohol degradation (per mill) of a person with the given stats in the given number of minutes.
                result result = apiInstance.getDegradation(apiecoKey, age, weight, height, sex, minutes);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.getDegradation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$age = 56; // Integer | your age
$weight = 56; // Integer | your weight
$height = 56; // Integer | your height
$sex = sex_example; // String | True or False
$minutes = 56; // Integer | your minutes

try {
    $result = $api_instance->getDegradation($apiecoKey, $age, $weight, $height, $sex, $minutes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateApi->getDegradation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateApi;

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $age = 56; # Integer | your age
my $weight = 56; # Integer | your weight
my $height = 56; # Integer | your height
my $sex = sex_example; # String | True or False
my $minutes = 56; # Integer | your minutes

eval { 
    my $result = $api_instance->getDegradation(apiecoKey => $apiecoKey, age => $age, weight => $weight, height => $height, sex => $sex, minutes => $minutes);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->getDegradation: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
age = 56 # Integer | your age
weight = 56 # Integer | your weight
height = 56 # Integer | your height
sex = sex_example # String | True or False
minutes = 56 # Integer | your minutes

try: 
    # Returns the alcohol degradation (per mill) of a person with the given stats in the given number of minutes.
    api_response = api_instance.get_degradation(apiecoKey, age, weight, height, sex, minutes)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->getDegradation: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
age*
Integer
your age
Required
weight*
Integer
your weight
Required
height*
Integer
your height
Required
sex*
String
True or False
Required
minutes*
Integer
your minutes
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error


grammToPromille

Return the blood alcohol contents of a person, given alcohol (in gramm) and body water (in liter).


/apitalk/blood-alcohol-api/gramm_to_promille/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/gramm_to_promille/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer gramm = 56; // Integer | your gramm
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        try {
            result result = apiInstance.grammToPromille(apiecoKey, gramm, age, weight, height, sex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#grammToPromille");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer gramm = 56; // Integer | your gramm
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        try {
            result result = apiInstance.grammToPromille(apiecoKey, gramm, age, weight, height, sex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#grammToPromille");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
Integer *gramm = 56; // your gramm
Integer *age = 56; // your age
Integer *weight = 56; // your weight
Integer *height = 56; // your height
String *sex = sex_example; // True or False

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

// Return the blood alcohol contents of a person, given alcohol (in gramm) and body water (in liter).
[apiInstance grammToPromilleWith:apiecoKey
    gramm:gramm
    age:age
    weight:weight
    height:height
    sex:sex
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var gramm = 56; // {Integer} your gramm

var age = 56; // {Integer} your age

var weight = 56; // {Integer} your weight

var height = 56; // {Integer} your height

var sex = sex_example; // {String} True or False


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

namespace Example
{
    public class grammToPromilleExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var gramm = 56;  // Integer | your gramm
            var age = 56;  // Integer | your age
            var weight = 56;  // Integer | your weight
            var height = 56;  // Integer | your height
            var sex = sex_example;  // String | True or False

            try
            {
                // Return the blood alcohol contents of a person, given alcohol (in gramm) and body water (in liter).
                result result = apiInstance.grammToPromille(apiecoKey, gramm, age, weight, height, sex);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.grammToPromille: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$gramm = 56; // Integer | your gramm
$age = 56; // Integer | your age
$weight = 56; // Integer | your weight
$height = 56; // Integer | your height
$sex = sex_example; // String | True or False

try {
    $result = $api_instance->grammToPromille($apiecoKey, $gramm, $age, $weight, $height, $sex);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateApi->grammToPromille: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateApi;

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $gramm = 56; # Integer | your gramm
my $age = 56; # Integer | your age
my $weight = 56; # Integer | your weight
my $height = 56; # Integer | your height
my $sex = sex_example; # String | True or False

eval { 
    my $result = $api_instance->grammToPromille(apiecoKey => $apiecoKey, gramm => $gramm, age => $age, weight => $weight, height => $height, sex => $sex);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->grammToPromille: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
gramm = 56 # Integer | your gramm
age = 56 # Integer | your age
weight = 56 # Integer | your weight
height = 56 # Integer | your height
sex = sex_example # String | True or False

try: 
    # Return the blood alcohol contents of a person, given alcohol (in gramm) and body water (in liter).
    api_response = api_instance.gramm_to_promille(apiecoKey, gramm, age, weight, height, sex)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->grammToPromille: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
gramm*
Integer
your gramm
Required
age*
Integer
your age
Required
weight*
Integer
your weight
Required
height*
Integer
your height
Required
sex*
String
True or False
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error


promilleToGramm

Return the ammount of alcohol in a persons body (in gramm), given promille and body water (in liter).


/apitalk/blood-alcohol-api/promille_to_gramm/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/apitalk/blood-alcohol-api/promille_to_gramm/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateApi;

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

public class CalculateApiExample {

    public static void main(String[] args) {
        
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer promille = 56; // Integer | your promille
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        try {
            result result = apiInstance.promilleToGramm(apiecoKey, promille, age, weight, height, sex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#promilleToGramm");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateApi;

public class CalculateApiExample {

    public static void main(String[] args) {
        CalculateApi apiInstance = new CalculateApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Integer promille = 56; // Integer | your promille
        Integer age = 56; // Integer | your age
        Integer weight = 56; // Integer | your weight
        Integer height = 56; // Integer | your height
        String sex = sex_example; // String | True or False
        try {
            result result = apiInstance.promilleToGramm(apiecoKey, promille, age, weight, height, sex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateApi#promilleToGramm");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API
Integer *promille = 56; // your promille
Integer *age = 56; // your age
Integer *weight = 56; // your weight
Integer *height = 56; // your height
String *sex = sex_example; // True or False

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

// Return the ammount of alcohol in a persons body (in gramm), given promille and body water (in liter).
[apiInstance promilleToGrammWith:apiecoKey
    promille:promille
    age:age
    weight:weight
    height:height
    sex:sex
              completionHandler: ^(result output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BloodAlcoholApi = require('blood_alcohol_api');

var api = new BloodAlcoholApi.CalculateApi()

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

var promille = 56; // {Integer} your promille

var age = 56; // {Integer} your age

var weight = 56; // {Integer} your weight

var height = 56; // {Integer} your height

var sex = sex_example; // {String} True or False


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

namespace Example
{
    public class promilleToGrammExample
    {
        public void main()
        {
            
            var apiInstance = new CalculateApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API
            var promille = 56;  // Integer | your promille
            var age = 56;  // Integer | your age
            var weight = 56;  // Integer | your weight
            var height = 56;  // Integer | your height
            var sex = sex_example;  // String | True or False

            try
            {
                // Return the ammount of alcohol in a persons body (in gramm), given promille and body water (in liter).
                result result = apiInstance.promilleToGramm(apiecoKey, promille, age, weight, height, sex);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateApi.promilleToGramm: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CalculateApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$promille = 56; // Integer | your promille
$age = 56; // Integer | your age
$weight = 56; // Integer | your weight
$height = 56; // Integer | your height
$sex = sex_example; // String | True or False

try {
    $result = $api_instance->promilleToGramm($apiecoKey, $promille, $age, $weight, $height, $sex);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateApi->promilleToGramm: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateApi;

my $api_instance = WWW::SwaggerClient::CalculateApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $promille = 56; # Integer | your promille
my $age = 56; # Integer | your age
my $weight = 56; # Integer | your weight
my $height = 56; # Integer | your height
my $sex = sex_example; # String | True or False

eval { 
    my $result = $api_instance->promilleToGramm(apiecoKey => $apiecoKey, promille => $promille, age => $age, weight => $weight, height => $height, sex => $sex);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateApi->promilleToGramm: $@\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.CalculateApi()
apiecoKey = apiecoKey_example # String | apikey for use API
promille = 56 # Integer | your promille
age = 56 # Integer | your age
weight = 56 # Integer | your weight
height = 56 # Integer | your height
sex = sex_example # String | True or False

try: 
    # Return the ammount of alcohol in a persons body (in gramm), given promille and body water (in liter).
    api_response = api_instance.promille_to_gramm(apiecoKey, promille, age, weight, height, sex)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateApi->promilleToGramm: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Form parameters
Name Description
promille*
Integer
your promille
Required
age*
Integer
your age
Required
weight*
Integer
your weight
Required
height*
Integer
your height
Required
sex*
String
True or False
Required

Responses

Status: 200 - This REST API return HTTP responses in JSON formats:

Status: 202 - Not Valid Url

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 405 - Method Not Allowed

Status: 500 - Internal Server Error