mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Added a JSON interface to the aur. This should make it easier for developers to integrate command line utilities and poll against the AUR itself.
22 lines
451 B
PHP
22 lines
451 B
PHP
<?php
|
|
|
|
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
|
|
|
|
include("aur.inc");
|
|
include("aurjson.class.php");
|
|
|
|
$rpc_o = new AurJSON();
|
|
if ( $_SERVER['REQUEST_METHOD'] == 'GET' ) {
|
|
if ( isset($_GET['type']) ) {
|
|
echo $rpc_o->handle($_GET);
|
|
}
|
|
else {
|
|
echo '<html><body>';
|
|
echo $rpc_o->usage();
|
|
echo '</body></html>';
|
|
}
|
|
}
|
|
else {
|
|
echo 'POST NOT SUPPORTED';
|
|
}
|
|
?>
|