Exports Calls

Nov 4, 2014 at 6:25 PM
How to access reports from the API? on page https://mandrillapp.com/api/docs/exports.php.html, I found this
<?php
try {
    $mandrill = new Mandrill('YOUR_API_KEY');
    $id = 'example id';
    $result = $mandrill->exports->info($id);
    print_r($result);
    /*
    Array
    (
        [id] => 2013-01-01 12:20:28.13842
        [created_at] => 2013-01-01 12:30:28
        [type] => activity
        [finished_at] => 2013-01-01 12:35:52
        [state] => working
        [result_url] => http://exports.mandrillapp.com/example/export.zip
    )
    */
} catch(Mandrill_Error $e) {
    // Mandrill errors are thrown as exceptions
    echo 'A mandrill error occurred: ' . get_class($e) . ' - ' . $e->getMessage();
    // A mandrill error occurred: Mandrill_Invalid_Key - Invalid API key
    throw $e;
}
?>
Someone has an idea or has already done
Thanks and regards