<?php
require dirname(__FILE__) . '/../../autoload.php';

// Init du service
$service = new \SparkWebService(array('cache_wsdl' => WSDL_CACHE_NONE));

//Paramètres de base
$token = 'test';

$date = new DateTime();
$dateFormat = $date->format('Ymd');
$publicKey = md5(uniqid('SparkWeb'));
$WebArticleId = "";
$StartDate = new DateTime("1990-01-01");
$EndDate = new DateTime("2025-01-01");

$key = $token . $publicKey .  $dateFormat;
$hashkey = md5($key);

// // Init du service
$service = new \SparkWebService(array('cache_wsdl' => WSDL_CACHE_NONE));

// Méthode GetArticles
// Init des paramètres
$request = new \GetArticles($hashkey,$publicKey, $WebArticleId, $StartDate, $EndDate);


// Récupération de la réponse
$response = $service->GetArticles($request);
var_dump($response);
