about summary refs log tree commit diff
path: root/LibMatrix/Responses
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-04 02:17:10 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-04 02:17:10 +0200
commit21da6cde79ccd0cb7f895a29e3d8cab959ef11ba (patch)
treefb0b89566b64ae907d7ca3ea8a29adcf0c0361d0 /LibMatrix/Responses
parentClean up some extension functions (diff)
downloadLibMatrix-21da6cde79ccd0cb7f895a29e3d8cab959ef11ba.tar.xz
Too many changes to name...
Diffstat (limited to '')
-rw-r--r--LibMatrix/Responses/Admin/AdminRoomListingResult.cs1
-rw-r--r--LibMatrix/Responses/ClientVersionsResponse.cs12
-rw-r--r--LibMatrix/Responses/CreateRoomRequest.cs4
-rw-r--r--LibMatrix/Responses/LoginResponse.cs21
4 files changed, 38 insertions, 0 deletions
diff --git a/LibMatrix/Responses/Admin/AdminRoomListingResult.cs b/LibMatrix/Responses/Admin/AdminRoomListingResult.cs
index f035184..bbc23e6 100644
--- a/LibMatrix/Responses/Admin/AdminRoomListingResult.cs
+++ b/LibMatrix/Responses/Admin/AdminRoomListingResult.cs
@@ -1,3 +1,4 @@
+using System.Collections.Generic;
 using System.Text.Json.Serialization;
 
 namespace LibMatrix.Responses.Admin;
diff --git a/LibMatrix/Responses/ClientVersionsResponse.cs b/LibMatrix/Responses/ClientVersionsResponse.cs
new file mode 100644
index 0000000..7fac565
--- /dev/null
+++ b/LibMatrix/Responses/ClientVersionsResponse.cs
@@ -0,0 +1,12 @@
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace LibMatrix.Responses;
+
+public class ClientVersionsResponse {
+    [JsonPropertyName("versions")]
+    public List<string> Versions { get; set; } = new();
+
+    [JsonPropertyName("unstable_features")]
+    public Dictionary<string, bool> UnstableFeatures { get; set; } = new();
+}
diff --git a/LibMatrix/Responses/CreateRoomRequest.cs b/LibMatrix/Responses/CreateRoomRequest.cs
index d59e6fd..c1c1697 100644
--- a/LibMatrix/Responses/CreateRoomRequest.cs
+++ b/LibMatrix/Responses/CreateRoomRequest.cs
@@ -1,8 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Reflection;
 using System.Text.Json.Nodes;
 using System.Text.Json.Serialization;
 using System.Text.RegularExpressions;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.StateEventTypes.Spec;
 
 namespace LibMatrix.Responses;
diff --git a/LibMatrix/Responses/LoginResponse.cs b/LibMatrix/Responses/LoginResponse.cs
index 2800a9c..175f337 100644
--- a/LibMatrix/Responses/LoginResponse.cs
+++ b/LibMatrix/Responses/LoginResponse.cs
@@ -15,3 +15,24 @@ public class LoginResponse {
     [JsonPropertyName("user_id")]
     public string UserId { get; set; }
 }
+public class LoginRequest {
+    [JsonPropertyName("type")]
+    public string Type { get; set; } = "m.login.password";
+
+    [JsonPropertyName("identifier")]
+    public LoginIdentifier Identifier { get; set; } = new();
+
+    [JsonPropertyName("password")]
+    public string Password { get; set; } = "";
+
+    [JsonPropertyName("initial_device_display_name")]
+    public string InitialDeviceDisplayName { get; set; } = "Rory&::LibMatrix";
+
+    public class LoginIdentifier {
+        [JsonPropertyName("type")]
+        public string Type { get; set; } = "m.id.user";
+
+        [JsonPropertyName("user")]
+        public string User { get; set; } = "";
+    }
+}