Plateformes
Post /statistics/platforms/{type}
Paramètres dans l'URL :
Nom | Description | Type | Obligatoire |
---|---|---|---|
/ | Détail par type d'appareil | String | Non |
/computers | Détail pour ordinateur de bureau | String | Non |
/computers/total | Total pour ordinateur de bureau | String | Non |
/mobiles | Détail pour appareil mobile | String | Non |
/mobiles/total | Total pour appareil mobile | String | Non |
Paramètres :
Nom | Description | Type | Obligatoire |
---|---|---|---|
dateBegin | Date de début au format YYYY-MM-ddThh:mm:ss | Int | Non |
dateEnd | Date de fin au format YYYY-MM-ddThh:mm:ss | Int | Non |
froms | Email(s) de l'expéditeur | Array | Non |
apiKeys | Tableau de clés Api | Array | Non |
tags | Tableau de tags | Array | Non |
Réponse :
Nom | Description | Type | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
date |
Tableau contenant les informations des emails ouverts en fonction de la date / Premier jour du mois
|
String |
Langage de programmation :
Exemple de requête :
{ "dateBegin": 1454545657, "dateEnd": 1564564564 }
Exemple de réponse :
{ "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" } ] }
Exemple de code :
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) { } } }