mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-23 09:02:41 +00:00
dc9f5e545e
Also start on handling the v1-2 API
20 lines
No EOL
605 B
PHP
20 lines
No EOL
605 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
namespace JKingWeb\Arsse\REST\NextCloudNews;
|
|
use JKingWeb\Arsse\REST\Response;
|
|
|
|
class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler {
|
|
function __construct() {
|
|
}
|
|
|
|
function dispatch(\JKingWeb\Arsse\REST\Request $req): \JKingWeb\Arsse\REST\Response {
|
|
// parse the URL and populate $path and $query
|
|
extract($this->parseURL($req->url));
|
|
if(preg_match("<^/(items|folders|feeds|cleanup|version|status|user)(?:/([^/]+))?(?:/([^/]+))?(?:/([^/]+))?/?$>", $path, $matches)) {
|
|
$scope = $matches[1];
|
|
var_export($scope);
|
|
} else {
|
|
return new Response(404);
|
|
}
|
|
}
|
|
} |