mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 17:32:30 +00:00
Add attachment list API
This commit is contained in:
1 parent
fbd4bd2b5a
commit
ffd7f00336
8 files changed
+223
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Spacebar.Models.Generic;
|
||||
|
||||
namespace Spacebar.Models.Api;
|
||||
|
||||
@@ -38,4 +39,20 @@ public class CreateAttachmentResponse {
|
||||
[JsonPropertyName("original_content_type")]
|
||||
public string? OriginalContentType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class AttachmentListResponse {
|
||||
[JsonPropertyName("total")]
|
||||
public int Total { get; set; }
|
||||
|
||||
[JsonPropertyName("items")]
|
||||
public List<Entry> Items { get; set; }
|
||||
|
||||
public class Entry {
|
||||
[JsonPropertyName("attachment")]
|
||||
public MessageAttachment Attachment { get; set; }
|
||||
|
||||
[JsonPropertyName("message_reference")]
|
||||
public MessageReference MessageReference { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,4 +6,9 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Spacebar.Models.Generic\Spacebar.Models.Generic.csproj" Condition="'$(ContinuousIntegrationBuild)'!='true'"/>
|
||||
<PackageReference Include="Spacebar.Models.Generic" Version="*-preview*" Condition="'$(ContinuousIntegrationBuild)'=='true'"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in new issue
Block a user