about summary refs log tree commit diff
path: root/LibMatrix/Responses/UserDirectoryResponse.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-11-16 03:33:00 +0100
committerRory& <root@rory.gay>2024-11-16 03:33:00 +0100
commit652cabb51294064f51b6459f000c75941f412a27 (patch)
tree653448091fb00175db72806825d8712512a2c5c0 /LibMatrix/Responses/UserDirectoryResponse.cs
parentUpdate to .NET 9 (diff)
downloadLibMatrix-master.tar.xz
HSE updates HEAD master
Diffstat (limited to 'LibMatrix/Responses/UserDirectoryResponse.cs')
-rw-r--r--LibMatrix/Responses/UserDirectoryResponse.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/LibMatrix/Responses/UserDirectoryResponse.cs b/LibMatrix/Responses/UserDirectoryResponse.cs
new file mode 100644
index 0000000..13235d9
--- /dev/null
+++ b/LibMatrix/Responses/UserDirectoryResponse.cs
@@ -0,0 +1,30 @@
+using System.Text.Json.Serialization;
+
+namespace LibMatrix.Responses;
+
+public class UserDirectoryResponse {
+    [JsonPropertyName("limited")]
+    public bool Limited { get; set; }
+    
+    [JsonPropertyName("results")]
+    public List<UserDirectoryResult> Results { get; set; }
+
+    public class UserDirectoryResult {
+        [JsonPropertyName("avatar_url")]
+        public string? AvatarUrl { get; set; }
+        
+        [JsonPropertyName("display_name")]
+        public string? DisplayName { get; set; }
+        
+        [JsonPropertyName("user_id")]
+        public string UserId { get; set; }
+    }
+}
+
+public class UserDirectoryRequest {
+    [JsonPropertyName("search_term")]
+    public string SearchTerm { get; set; }
+    
+    [JsonPropertyName("limit")]
+    public int? Limit { get; set; }
+}
\ No newline at end of file