Post.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.IO;
  5. using System.Net;
  6. using System.Net.Http;
  7. using System.Net.Mail;
  8. using System.Text.Json.Serialization;
  9. using System.Threading.Tasks;
  10. namespace VeloeKemonoPartyApp.Data
  11. {
  12. public class Post
  13. {
  14. [JsonPropertyName("added")]
  15. public string Added { get; set; }
  16. [JsonPropertyName("attachments")]
  17. public List<Attachment> Attachments { get; set; }
  18. [JsonPropertyName("content")]
  19. public string Content { get; set; }
  20. [JsonPropertyName("edited")]
  21. public string Edited { get; set; }
  22. [JsonPropertyName("embed")]
  23. public Embed Embed { get; set; }
  24. [JsonPropertyName("file")]
  25. public File File { get; set; }
  26. [JsonPropertyName("id")]
  27. public string Id { get; set; }
  28. [JsonPropertyName("published")]
  29. public string Published { get; set; }
  30. [JsonPropertyName("service")]
  31. public string Service { get; set; }
  32. [JsonPropertyName("shared_file")]
  33. public bool SharedFile { get; set; }
  34. [JsonPropertyName("title")]
  35. public string Title { get; set; }
  36. [JsonPropertyName("user")]
  37. public string User { get; set; }
  38. }
  39. public class Attachment
  40. {
  41. [JsonPropertyName("name")]
  42. public string Name { get; set; }
  43. [JsonPropertyName("path")]
  44. public string Path { get; set; }
  45. public string Link
  46. {
  47. get
  48. {
  49. return $"https://kemono.party/data{Path}";
  50. }
  51. }
  52. }
  53. public class Embed
  54. {
  55. [JsonPropertyName("description")]
  56. public string Description { get; set; }
  57. [JsonPropertyName("subject")]
  58. public string Subject { get; set; }
  59. [JsonPropertyName("url")]
  60. public string Url { get; set; }
  61. }
  62. public class File
  63. {
  64. [JsonPropertyName("name")]
  65. public string Name { get; set; }
  66. [JsonPropertyName("path")]
  67. public string Path { get; set; }
  68. }
  69. }