<?php
include_once "core/24news_api.php";
$api = new News24Api("http://24tv.ua/feed/");

header("Access-Control-Allow-Origin: *");

switch ($_GET["methodName"]) {
	case 'androidNewsCount':
		$api->getNewNewsCountFrom($_GET);
		break;
	case 'getNews':
		$api->getNews($_GET);
		break;
	default:
		echo json_encode(array("status" => 400, "error" => "unknown method"));
		break;
}

?>