Platformes d'email
Post /statistics/emailplatforms/{type}
Paramètres dans l'URL :
| Nom | Description | Type | Obligatoire |
|---|---|---|---|
| / | Toutes les technologies utilisées pour lire l'email | String | Non |
| /webmails | Filtre par webmail | String | Non |
| /webmails/total | Total pour les webmails | String | Non |
| /applications | Filtre par application | String | Non |
| /applications/total | Total pour les applications | 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": "2019-01-20T09:00:00",
"dateEnd": "2019-01-21T22:59:59"
}
Exemple de réponse :
{
"1438387200": [
{
"open": 16,
"name": "CHROME 43.0.2357.130",
"type": "application"
}
],
"1441065600": [
{
"open": 1,
"name": "FIREFOX11 11.0",
"type": "webmail"
},
{
"open": 10,
"name": "CHROME 44.0.2403.89",
"type": "application"
},
{
"open": 8,
"name": "CHROME 45.0.2454.85",
"type": "application"
},
{
"open": 4,
"name": "OUTLOOK2010 14",
"type": "application"
},
{
"open": 2,
"name": "CHROME 42.0.2311.90",
"type": "application"
}
],
"1443657600": [
{
"open": 6,
"name": "CHROME 45.0.2454.85",
"type": "application"
},
{
"open": 4,
"name": "CHROME 45.0.2454.101",
"type": "application"
},
{
"open": 1,
"name": "THUNDERBIRD3 38.2.0",
"type": "application"
}
]
}
Exemple de code :
curl -X POST -d '{"dateBegin":"2019-01-20T09:00:00","dateEnd":"2019-01-21T22:59:59"}' -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/webmailorapplication
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()->getEmailPlatformsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getWebmailsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getWebmails($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getApplicationsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getApplications($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<StatisticsWebmailOrApplication>> emailPlatformsByDate;
emailPlatformsByDate = tipimail.getStatisticsService().getEmailPlatformsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
HashMap<String, ArrayList<StatisticsWebmailOrApplication>> webmailsByDate;
webmailsByDate = tipimail.getStatisticsService().getWebmailsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
StatisticsWebmailOrApplicationOpen webmails;
webmails = tipimail.getStatisticsService().getWebmails(dateBegin, dateEnd, froms, tags, apiKeys);
HashMap<String, ArrayList<StatisticsWebmailOrApplication>> applicationsByDate;
applicationsByDate = tipimail.getStatisticsService().getApplicationsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
StatisticsWebmailOrApplicationOpen applications;
applications = tipimail.getStatisticsService().getApplications(dateBegin, dateEnd, froms, tags, apiKeys);
}
catch (TipimailException e) {
}
}
}