mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Added AurJSON code.
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.
This commit is contained in:
parent
0cda12132d
commit
5e38e3d3d0
3 changed files with 168 additions and 0 deletions
22
web/html/rpc.php
Normal file
22
web/html/rpc.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?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';
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue