Get platforms

Post /statistics/platforms/{type}

URL parameters:

Name Description Type Mandatory
/ Get all detail whatever the device String No
/computers Get detail of computers String No
/computers/total Get total of computers String No
/mobiles Get detail of mobile String No
/mobiles/total Get total of mobile String No

Parameters:

Name Description Type Mandatory
dateBegin Date begin on YYYY-MM-ddThh:mm:ss format Int No
dateEnd Date end on YYYY-MM-ddThh:mm:ss format Int No
froms Array of Senders email Array No
apiKeys Array of api keys Array No
tags Array of tags Array No

Response:

Name Description Type
date

An array with information about email opens return on date / First day of the month

Name Description Type
open Number of open Int
operatingSystem OS name String
deviceType "computer" or "mobile" String
String
Programming language:

Request exemple:

							{
								"dateBegin": 1454545657,
								"dateEnd": 1564564564
							}
							

Response exemple:

								{
									"1438387200": [
										{
											"open": 16,
											"operatingSystem": "LINUX",
											"deviceType": "Computer"
										},
										{
											"open": 3,
											"operatingSystem": "MAC_OS_X",
											"deviceType": "Computer"
										}
									],
									"1441065600": [
										{
											"open": 18,
											"operatingSystem": "LINUX",
											"deviceType": "Computer"
										},
										{
											"open": 6,
											"operatingSystem": "WINDOWS_7",
											"deviceType": "Computer"
										},
										{
											"open": 1,
											"operatingSystem": "PROXY",
											"deviceType": "Unknown"
										}
									],
									"1443657600": [
										{
											"open": 11,
											"operatingSystem": "LINUX",
											"deviceType": "Computer"
										}
									]
								}
							

Code example:

								curl -X POST -d '{"dateBegin":"1443046641","dateEnd":"1443219441"}' -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_API_USERNAME" -H "X-Tipimail-ApiKey:YOUR_API_KEY" https://api.tipimail.com/v1/statistics/platforms
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$dateBegin = null;
	$dateEnd = null;
	$froms = null;
	$apiKeys = null;
	$tags = null;
	
	$result = $tipimail->getStatisticsService()->getPlatformsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
	var_dump($result);
	
	$result = $tipimail->getStatisticsService()->getComputersByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
	var_dump($result);
	
	$result = $tipimail->getStatisticsService()->getComputers($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
	var_dump($result);
	
	$result = $tipimail->getStatisticsService()->getMobilesByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
	var_dump($result);
	
	$result = $tipimail->getStatisticsService()->getMobiles($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
	var_dump($result);
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}

...

public class Example {
	
	public static void main(String[] args) {
		
		Tipimail tipimail = new Tipimail("YOUR_SMTP_USERNAME", "YOUR_API_KEY");
		
		try {
			
			nteger dateBegin = null;
			Integer dateEnd = null;
			ArrayList<String> froms = null;
			ArrayList<String> tags = null;
			ArrayList<String> apiKeys = null;
			
			HashMap<String, ArrayList<StatisticsPlatform>> platformsByDate;
			platformsByDate = tipimail.getStatisticsService().getPlatformsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
			
			HashMap<String, ArrayList<StatisticsPlatform>> computersByDate;
			computersByDate = tipimail.getStatisticsService().getComputersByDate(dateBegin, dateEnd, froms, tags, apiKeys);
			
			ArrayList<StatisticsPlatform> computers;
			computers = tipimail.getStatisticsService().getComputers(dateBegin, dateEnd, froms, tags, apiKeys);
			
			HashMap<String, StatisticsPlatform> mobilesByDate;
			mobilesByDate = tipimail.getStatisticsService().getMobilesByDate(dateBegin, dateEnd, froms, tags, apiKeys);
			
			ArrayList<StatisticsPlatform> mobiles;
			mobiles = tipimail.getStatisticsService().getMobiles(dateBegin, dateEnd, froms, tags, apiKeys);
		
		}
		catch (TipimailException e) {
			
		}
	
	}
	
}