itemID prop for Tags; PocketArticle model

This commit is contained in:
2014-05-11 22:26:08 +02:00
parent a207ca7ca4
commit 500bd1c65d
3 changed files with 175 additions and 0 deletions
+1
View File
@@ -1,4 +1,5 @@
using PocketSharp.Models;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+165
View File
@@ -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
{
/// <summary>
/// Article
/// </summary>
[JsonObject]
[ImplementPropertyChanged]
public class PocketArticle
{
/// <summary>
/// Gets or sets the response Code (200 = OK).
/// </summary>
/// <value>
/// The response Code.
/// </value>
[JsonProperty("responseCode")]
public string ResponseCode { get; set; }
/// <summary>
/// Gets or sets the ID.
/// </summary>
/// <value>
/// The ID.
/// </value>
[JsonProperty("resolved_id")]
public string ID { get; set; }
/// <summary>
/// Gets or sets the URI.
/// </summary>
/// <value>
/// The URI.
/// </value>
[JsonProperty("resolvedUrl")]
public Uri Uri { get; set; }
/// <summary>
/// Gets or sets the URI.
/// </summary>
/// <value>
/// The URI.
/// </value>
[JsonProperty("timePublished")]
public DateTime? PublishedTime { get; set; }
/// <summary>
/// Gets or sets the word count.
/// </summary>
/// <value>
/// The word count.
/// </value>
[JsonProperty("wordCount")]
public int WordCount { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is article.
/// </summary>
/// <value>
/// <c>true</c> if this instance is article; otherwise, <c>false</c>.
/// </value>
[JsonProperty("isArticle")]
public bool IsArticle { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is video.
/// </summary>
/// <value>
/// <c>true</c> if this instance is video; otherwise, <c>false</c>.
/// </value>
[JsonProperty("isVideo")]
public bool IsVideo { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is index.
/// </summary>
/// <value>
/// <c>true</c> if this instance is index; otherwise, <c>false</c>.
/// </value>
[JsonProperty("isIndex")]
public bool IsIndex { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance used fallback.
/// </summary>
/// <value>
/// <c>true</c> if this instance used fallback; otherwise, <c>false</c>.
/// </value>
[JsonProperty("usedFallback")]
public bool UsedFallback { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance requires login.
/// </summary>
/// <value>
/// <c>true</c> if this instance requires login; otherwise, <c>false</c>.
/// </value>
[JsonProperty("requiresLogin")]
public bool RequiresLogin { get; set; }
/// <summary>
/// Gets or sets the images.
/// </summary>
/// <value>
/// The images.
/// </value>
[JsonProperty("images")]
[JsonConverter(typeof(ObjectToArrayConverter<PocketImage>))]
public IEnumerable<PocketImage> Images { get; set; }
/// <summary>
/// Gets or sets the videos.
/// </summary>
/// <value>
/// The videos.
/// </value>
[JsonProperty("videos")]
[JsonConverter(typeof(ObjectToArrayConverter<PocketVideo>))]
public IEnumerable<PocketVideo> Videos { get; set; }
/// <summary>
/// Gets or sets the authors.
/// </summary>
/// <value>
/// The authors.
/// </value>
[JsonProperty("authors")]
[JsonConverter(typeof(ObjectToArrayConverter<PocketAuthor>))]
public IEnumerable<PocketAuthor> Authors { get; set; }
/// <summary>
/// Gets or sets the article title.
/// </summary>
/// <value>
/// The Title.
/// </value>
[JsonProperty("title")]
public string Title { get; set; }
/// <summary>
/// Gets or sets the Excerpt.
/// </summary>
/// <value>
/// The Excerpt.
/// </value>
[JsonProperty("excerpt")]
public string Excerpt { get; set; }
/// <summary>
/// Gets or sets the Content.
/// </summary>
/// <value>
/// The Content.
/// </value>
[JsonProperty("article")]
public string Content { get; set; }
}
}
+9
View File
@@ -18,5 +18,14 @@ namespace PocketSharp.Models
/// </value>
[JsonProperty("tag")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the item iD.
/// </summary>
/// <value>
/// The name.
/// </value>
[JsonProperty("item_id")]
public string ItemID { get; set; }
}
}