<?php
require __DIR__ . '/../../vendor/autoload.php';
//date_default_timezone_set ("America/Mazatlan");


ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

function dumpAndDie($what){
  echo "<pre>";
  var_dump($what);
  die();
}

$settings = require __DIR__ . '/../../src/settings.php';

$settings = $settings['settings']['logger_omnibees'];
$logger = new Monolog\Logger($settings['name']);
$logger->pushProcessor(new Monolog\Processor\UidProcessor());
$logger->pushHandler(new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
 
$omnibees = new \APIS\Omnibees($logger);


//$response = $omnibees->GetState("130");
$response = $omnibees->GetCity(40,27);

echo json_decode($response) ? json_encode(json_decode($response), JSON_PRETTY_PRINT) : $response;
