mirror of
https://github.com/ckaczor/ChrisKaczor.MinifluxClient.git
synced 2026-02-16 10:58:35 -05:00
Initial commit
This commit is contained in:
20
Library/Models/Category.cs
Normal file
20
Library/Models/Category.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.MinifluxClient.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class Category
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public required string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("user_id")]
|
||||
public required long UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("hide_globally")]
|
||||
public required bool HideGlobally { get; set; }
|
||||
}
|
||||
26
Library/Models/Enclosure.cs
Normal file
26
Library/Models/Enclosure.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.MinifluxClient.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class Enclosure
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("user_id")]
|
||||
public required long UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("entry_id")]
|
||||
public required long EntryId { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public required string Url { get; set; }
|
||||
|
||||
[JsonPropertyName("mime_type")]
|
||||
public required string MimeType { get; set; }
|
||||
|
||||
[JsonPropertyName("size")]
|
||||
public required long Size { get; set; }
|
||||
}
|
||||
14
Library/Models/EntriesResponse.cs
Normal file
14
Library/Models/EntriesResponse.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.MinifluxClient.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class EntriesResponse
|
||||
{
|
||||
[JsonPropertyName("total")]
|
||||
public required int Total { get; set; }
|
||||
|
||||
[JsonPropertyName("entries")]
|
||||
public required List<Entry> Entries { get; set; }
|
||||
}
|
||||
65
Library/Models/Entry.cs
Normal file
65
Library/Models/Entry.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.MinifluxClient.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class Entry
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("user_id")]
|
||||
public required long UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("feed_id")]
|
||||
public required long FeedId { get; set; }
|
||||
|
||||
[JsonPropertyName("status")]
|
||||
public required string Status { get; set; }
|
||||
|
||||
[JsonPropertyName("hash")]
|
||||
public required string Hash { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public required string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public required string Url { get; set; }
|
||||
|
||||
[JsonPropertyName("comments_url")]
|
||||
public required string CommentsUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("published_at")]
|
||||
public required DateTimeOffset PublishedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("created_at")]
|
||||
public required DateTimeOffset CreatedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("changed_at")]
|
||||
public required DateTimeOffset ChangedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("content")]
|
||||
public required string Content { get; set; }
|
||||
|
||||
[JsonPropertyName("author")]
|
||||
public required string Author { get; set; }
|
||||
|
||||
[JsonPropertyName("share_code")]
|
||||
public required string ShareCode { get; set; }
|
||||
|
||||
[JsonPropertyName("starred")]
|
||||
public required bool Starred { get; set; }
|
||||
|
||||
[JsonPropertyName("reading_time")]
|
||||
public required int ReadingTime { get; set; }
|
||||
|
||||
[JsonPropertyName("enclosures")]
|
||||
public required List<Enclosure> Enclosures { get; set; }
|
||||
|
||||
[JsonPropertyName("feed")]
|
||||
public required Feed Feed { get; set; }
|
||||
|
||||
[JsonPropertyName("tags")]
|
||||
public required List<string> Tags { get; set; }
|
||||
}
|
||||
131
Library/Models/Feed.cs
Normal file
131
Library/Models/Feed.cs
Normal file
@@ -0,0 +1,131 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.MinifluxClient.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class Feed
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("user_id")]
|
||||
public required long UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("feed_url")]
|
||||
public required string FeedUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("site_url")]
|
||||
public required string SiteUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public required string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public required string Description { get; set; }
|
||||
|
||||
[JsonPropertyName("checked_at")]
|
||||
public required DateTimeOffset CheckedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("next_check_at")]
|
||||
public required DateTimeOffset NextCheckAt { get; set; }
|
||||
|
||||
[JsonPropertyName("etag_header")]
|
||||
public required string EtagHeader { get; set; }
|
||||
|
||||
[JsonPropertyName("last_modified_header")]
|
||||
public required string LastModifiedHeader { get; set; }
|
||||
|
||||
[JsonPropertyName("parsing_error_message")]
|
||||
public required string ParsingErrorMessage { get; set; }
|
||||
|
||||
[JsonPropertyName("parsing_error_count")]
|
||||
public required int ParsingErrorCount { get; set; }
|
||||
|
||||
[JsonPropertyName("scraper_rules")]
|
||||
public required string ScraperRules { get; set; }
|
||||
|
||||
[JsonPropertyName("rewrite_rules")]
|
||||
public required string RewriteRules { get; set; }
|
||||
|
||||
[JsonPropertyName("blocklist_rules")]
|
||||
public required string BlocklistRules { get; set; }
|
||||
|
||||
[JsonPropertyName("keeplist_rules")]
|
||||
public required string KeeplistRules { get; set; }
|
||||
|
||||
[JsonPropertyName("block_filter_entry_rules")]
|
||||
public required string BlockFilterEntryRules { get; set; }
|
||||
|
||||
[JsonPropertyName("keep_filter_entry_rules")]
|
||||
public required string KeepFilterEntryRules { get; set; }
|
||||
|
||||
[JsonPropertyName("urlrewrite_rules")]
|
||||
public required string UrlrewriteRules { get; set; }
|
||||
|
||||
[JsonPropertyName("user_agent")]
|
||||
public required string UserAgent { get; set; }
|
||||
|
||||
[JsonPropertyName("cookie")]
|
||||
public required string Cookie { get; set; }
|
||||
|
||||
[JsonPropertyName("username")]
|
||||
public required string Username { get; set; }
|
||||
|
||||
[JsonPropertyName("password")]
|
||||
public required string Password { get; set; }
|
||||
|
||||
[JsonPropertyName("disabled")]
|
||||
public required bool Disabled { get; set; }
|
||||
|
||||
[JsonPropertyName("no_media_player")]
|
||||
public required bool NoMediaPlayer { get; set; }
|
||||
|
||||
[JsonPropertyName("ignore_http_cache")]
|
||||
public required bool IgnoreHttpCache { get; set; }
|
||||
|
||||
[JsonPropertyName("allow_self_signed_certificates")]
|
||||
public required bool AllowSelfSignedCertificates { get; set; }
|
||||
|
||||
[JsonPropertyName("fetch_via_proxy")]
|
||||
public required bool FetchViaProxy { get; set; }
|
||||
|
||||
[JsonPropertyName("hide_globally")]
|
||||
public required bool HideGlobally { get; set; }
|
||||
|
||||
[JsonPropertyName("disable_http2")]
|
||||
public required bool DisableHttp2 { get; set; }
|
||||
|
||||
[JsonPropertyName("pushover_enabled")]
|
||||
public required bool PushoverEnabled { get; set; }
|
||||
|
||||
[JsonPropertyName("ntfy_enabled")]
|
||||
public required bool NtfyEnabled { get; set; }
|
||||
|
||||
[JsonPropertyName("crawler")]
|
||||
public required bool Crawler { get; set; }
|
||||
|
||||
[JsonPropertyName("apprise_service_urls")]
|
||||
public required string AppriseServiceUrls { get; set; }
|
||||
|
||||
[JsonPropertyName("webhook_url")]
|
||||
public required string WebhookUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("ntfy_priority")]
|
||||
public required int NtfyPriority { get; set; }
|
||||
|
||||
[JsonPropertyName("ntfy_topic")]
|
||||
public required string NtfyTopic { get; set; }
|
||||
|
||||
[JsonPropertyName("pushover_priority")]
|
||||
public required int PushoverPriority { get; set; }
|
||||
|
||||
[JsonPropertyName("proxy_url")]
|
||||
public required string ProxyUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("category")]
|
||||
public required Category Category { get; set; }
|
||||
|
||||
[JsonPropertyName("icon")]
|
||||
public required Icon Icon { get; set; }
|
||||
}
|
||||
17
Library/Models/Icon.cs
Normal file
17
Library/Models/Icon.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.MinifluxClient.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class Icon
|
||||
{
|
||||
[JsonPropertyName("feed_id")]
|
||||
public required long FeedId { get; set; }
|
||||
|
||||
[JsonPropertyName("icon_id")]
|
||||
public required long IconId { get; set; }
|
||||
|
||||
[JsonPropertyName("external_icon_id")]
|
||||
public required string ExternalIconId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user