The clean & modern RSS server that doesn't give you any crap.
https://thearsse.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
644 B
25 lines
644 B
<?php
|
|
declare(strict_types=1);
|
|
namespace JKingWeb\NewsSync\REST\NextCloudNews;
|
|
use JKingWeb\NewsSync\REST\Response;
|
|
|
|
class Versions implements \JKingWeb\NewsSync\REST\Handler {
|
|
function __construct(\JKingWeb\NewsSync\RuntimeData $data) {
|
|
}
|
|
|
|
function dispatch(\JKingWeb\NewsSync\REST\Request $req): \JKingWeb\NewsSync\REST\Response {
|
|
$path = $req->url;
|
|
$query = "";
|
|
if(strpos($path, "?") !== false) {
|
|
list($path, $query) = explode("?", $path);
|
|
}
|
|
if($req->method != "GET") {
|
|
return new Response(405);
|
|
}
|
|
if(preg_match("<^/?$>",$path)) {
|
|
return new Response(200, ['v1-2']);
|
|
} else {
|
|
return new Response(404);
|
|
}
|
|
}
|
|
}
|