aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2021-06-22 23:30:15 -0300
committerMatias Linares <matiaslina@gmail.com>2021-06-22 23:30:15 -0300
commitdd71c27fa34860719c137b80456f6b018637468a (patch)
tree69896bb64e07e4a45c95004ce31157fb7ffe9bc8
parente57b75a19a8f4a02bf93e99ac9dbf3c06575b219 (diff)
downloadperl6-matrix-client-synapse-admin-api.tar.gz
Add first implementation of Matrix::Client:Adminsynapse-admin-api
-rw-r--r--lib/Matrix/Client/Admin.rakumod65
1 files changed, 65 insertions, 0 deletions
diff --git a/lib/Matrix/Client/Admin.rakumod b/lib/Matrix/Client/Admin.rakumod
new file mode 100644
index 0000000..71a30d5
--- /dev/null
+++ b/lib/Matrix/Client/Admin.rakumod
@@ -0,0 +1,65 @@
+use Matrix::Client::Requester;
+
+unit class Matrix::Client::Admin does Matrix::Client::Requester;
+
+submethod TWEAK {
+ $!client-endpoint = '/_synapse/admin/v1';
+}
+
+method account-validity() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method delete-group() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method media-admin-api() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method purge-history-api() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method purge-remote-media() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method purge-room() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method register-api() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method server-notices() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method user-admin-api() {
+ X::NYI.new(
+ feature => &?ROUTINE.name
+ ).throw;
+}
+
+method version-api() {
+ from-json($.get('/server_version').content)
+}