diff options
Diffstat (limited to 'routes/nodeinfo.php')
| -rw-r--r-- | routes/nodeinfo.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/routes/nodeinfo.php b/routes/nodeinfo.php new file mode 100644 index 0000000..b507849 --- /dev/null +++ b/routes/nodeinfo.php @@ -0,0 +1,42 @@ +<?php + +use WpfTest\Router; + +Router::getInstance()->mount('/.well-known/nodeinfo', function (array $args) { + json_response([ + 'links' => [ + [ + 'rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.1', + 'href' => path_to_uri('/nodeinfo/2.1') + ] + ] + ], 'application/jrd+json'); +}); + +Router::getInstance()->mount('/nodeinfo/2.1', function (array $args) { + json_response([ + 'version' => '2.1', + 'software' => [ + 'name' => 'WPF test server', + 'version' => '0.1.0' + ], + 'protocols' => ['wpf'], + 'services' => [ + 'inbound' => [], + 'outbound' => [] + ], + 'openRegistrations' => false, + 'usage' => [ + 'users' => [ + 'total' => 1 + ] + ], + 'metadata' => [ + 'nodeName' => "winter's pawsome test server", + 'nodeDescription' => 'written in php i dunno', + 'wpfExtensions' => [ + // + ] + ] + ], 'application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.1#"'); +});
\ No newline at end of file |
