#!/usr/bin/env php
<?php

//----------------------------------------------------------------------
//
//  Copyright (C) 2015-2016 Artem Rodygin
//
//  This file is part of Linode API Client Library for PHP.
//
//  You should have received a copy of the MIT License along with
//  the library. If not, see <http://opensource.org/licenses/MIT>.
//
//----------------------------------------------------------------------

require_once __DIR__ . '/../vendor/autoload.php';

use Linode\Api;

$api = new Api(null);
$spec = $api->spec();

printf("Available version:\t%s\n", $api::VERSION);
printf("Library version:\t%s\n", $spec['VERSION']);

if ($api::VERSION !== (string)$spec['VERSION']) {
    printf("\nWARNING: the library is not up-to-date with the latest available API.\n");
}
