added basic api for 3rd-party clients

This commit is contained in:
benson
2022-12-23 17:25:06 +08:00
parent a0eb5260cf
commit 44810e5df2
9 changed files with 90 additions and 20 deletions

View File

@@ -63,7 +63,7 @@ class Application extends App implements IBootstrap
$context->registerService(Settings::class, function (ContainerInterface $c) use ($uid){
return new Settings($uid);
});
//$context->injectFn([$this, 'registerSearchProviders']);
}
}

View File

@@ -27,5 +27,8 @@ return [
['name' => 'Settings#saveYtdl', 'url' => '/personal/ytdl/save', 'verb' => 'POST'],
['name' => 'Settings#deleteYtdl', 'url' => '/personal/ytdl/delete', 'verb' => 'POST'],
['name' => 'Settings#getSettings', 'url' => '/getsettings', 'verb' => 'POST'],
//api routes
['name' => 'Api#download', 'url' => '/api/v1/download', 'verb' => 'POST'],
['name' => 'Api#search', 'url' => '/api/v1/search', 'verb' => 'POST'],
],
];