diff --git a/PocketSharp/Components/Modify.cs b/PocketSharp/Components/Modify.cs index b0462f5..4623c4a 100644 --- a/PocketSharp/Components/Modify.cs +++ b/PocketSharp/Components/Modify.cs @@ -1,4 +1,5 @@ using PocketSharp.Models; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/PocketSharp/Models/PocketArticle.cs b/PocketSharp/Models/PocketArticle.cs new file mode 100644 index 0000000..a9933b4 --- /dev/null +++ b/PocketSharp/Models/PocketArticle.cs @@ -0,0 +1,165 @@ +using Newtonsoft.Json; +using PropertyChanged; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PocketSharp.Models +{ + /// + /// Article + /// + [JsonObject] + [ImplementPropertyChanged] + public class PocketArticle + { + /// + /// Gets or sets the response Code (200 = OK). + /// + /// + /// The response Code. + /// + [JsonProperty("responseCode")] + public string ResponseCode { get; set; } + + /// + /// Gets or sets the ID. + /// + /// + /// The ID. + /// + [JsonProperty("resolved_id")] + public string ID { get; set; } + + /// + /// Gets or sets the URI. + /// + /// + /// The URI. + /// + [JsonProperty("resolvedUrl")] + public Uri Uri { get; set; } + + /// + /// Gets or sets the URI. + /// + /// + /// The URI. + /// + [JsonProperty("timePublished")] + public DateTime? PublishedTime { get; set; } + + /// + /// Gets or sets the word count. + /// + /// + /// The word count. + /// + [JsonProperty("wordCount")] + public int WordCount { get; set; } + + /// + /// Gets or sets a value indicating whether this instance is article. + /// + /// + /// true if this instance is article; otherwise, false. + /// + [JsonProperty("isArticle")] + public bool IsArticle { get; set; } + + /// + /// Gets or sets a value indicating whether this instance is video. + /// + /// + /// true if this instance is video; otherwise, false. + /// + [JsonProperty("isVideo")] + public bool IsVideo { get; set; } + + /// + /// Gets or sets a value indicating whether this instance is index. + /// + /// + /// true if this instance is index; otherwise, false. + /// + [JsonProperty("isIndex")] + public bool IsIndex { get; set; } + + /// + /// Gets or sets a value indicating whether this instance used fallback. + /// + /// + /// true if this instance used fallback; otherwise, false. + /// + [JsonProperty("usedFallback")] + public bool UsedFallback { get; set; } + + /// + /// Gets or sets a value indicating whether this instance requires login. + /// + /// + /// true if this instance requires login; otherwise, false. + /// + [JsonProperty("requiresLogin")] + public bool RequiresLogin { get; set; } + + /// + /// Gets or sets the images. + /// + /// + /// The images. + /// + [JsonProperty("images")] + [JsonConverter(typeof(ObjectToArrayConverter))] + public IEnumerable Images { get; set; } + + /// + /// Gets or sets the videos. + /// + /// + /// The videos. + /// + [JsonProperty("videos")] + [JsonConverter(typeof(ObjectToArrayConverter))] + public IEnumerable Videos { get; set; } + + /// + /// Gets or sets the authors. + /// + /// + /// The authors. + /// + [JsonProperty("authors")] + [JsonConverter(typeof(ObjectToArrayConverter))] + public IEnumerable Authors { get; set; } + + /// + /// Gets or sets the article title. + /// + /// + /// The Title. + /// + [JsonProperty("title")] + public string Title { get; set; } + + /// + /// Gets or sets the Excerpt. + /// + /// + /// The Excerpt. + /// + [JsonProperty("excerpt")] + public string Excerpt { get; set; } + + /// + /// Gets or sets the Content. + /// + /// + /// The Content. + /// + [JsonProperty("article")] + public string Content { get; set; } + } +} diff --git a/PocketSharp/Models/PocketTag.cs b/PocketSharp/Models/PocketTag.cs index 5505797..e51ec1f 100644 --- a/PocketSharp/Models/PocketTag.cs +++ b/PocketSharp/Models/PocketTag.cs @@ -18,5 +18,14 @@ namespace PocketSharp.Models /// [JsonProperty("tag")] public string Name { get; set; } + + /// + /// Gets or sets the item iD. + /// + /// + /// The name. + /// + [JsonProperty("item_id")] + public string ItemID { get; set; } } }