Guest User

Untitled

a guest
Jun 20th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.51 KB | None | 0 0
  1.  public class MediaEmbed
  2.     {
  3.         public string content { get; set; }
  4.         public int? width { get; set; }
  5.         public bool? scrolling { get; set; }
  6.         public int? height { get; set; }
  7.     }
  8.  
  9.     public class Oembed
  10.     {
  11.         public string provider_url { get; set; }
  12.         public string version { get; set; }
  13.         public string title { get; set; }
  14.         public int thumbnail_width { get; set; }
  15.         public int height { get; set; }
  16.         public int width { get; set; }
  17.         public string html { get; set; }
  18.         public string author_name { get; set; }
  19.         public string provider_name { get; set; }
  20.         public string thumbnail_url { get; set; }
  21.         public string type { get; set; }
  22.         public int thumbnail_height { get; set; }
  23.         public string author_url { get; set; }
  24.     }
  25.  
  26.     public class SecureMedia
  27.     {
  28.         public Oembed oembed { get; set; }
  29.         public string type { get; set; }
  30.     }
  31.  
  32.     public class SecureMediaEmbed
  33.     {
  34.         public string content { get; set; }
  35.         public int? width { get; set; }
  36.         public bool? scrolling { get; set; }
  37.         public int? height { get; set; }
  38.     }
  39.  
  40.     public class Source
  41.     {
  42.         public string url { get; set; }
  43.         public int width { get; set; }
  44.         public int height { get; set; }
  45.     }
  46.  
  47.     public class Resolution
  48.     {
  49.         public string url { get; set; }
  50.         public int width { get; set; }
  51.         public int height { get; set; }
  52.     }
  53.  
  54.     public class Source2
  55.     {
  56.         public string url { get; set; }
  57.         public int width { get; set; }
  58.         public int height { get; set; }
  59.     }
  60.  
  61.     public class Resolution2
  62.     {
  63.         public string url { get; set; }
  64.         public int width { get; set; }
  65.         public int height { get; set; }
  66.     }
  67.  
  68.     public class Gif
  69.     {
  70.         public Source2 source { get; set; }
  71.         public List<Resolution2> resolutions { get; set; }
  72.     }
  73.  
  74.     public class Source3
  75.     {
  76.         public string url { get; set; }
  77.         public int width { get; set; }
  78.         public int height { get; set; }
  79.     }
  80.  
  81.     public class Resolution3
  82.     {
  83.         public string url { get; set; }
  84.         public int width { get; set; }
  85.         public int height { get; set; }
  86.     }
  87.  
  88.     public class Mp4
  89.     {
  90.         public Source3 source { get; set; }
  91.         public List<Resolution3> resolutions { get; set; }
  92.     }
  93.  
  94.     public class Variants
  95.     {
  96.         public Gif gif { get; set; }
  97.         public Mp4 mp4 { get; set; }
  98.     }
  99.  
  100.     public class Image
  101.     {
  102.         public Source source { get; set; }
  103.         public List<Resolution> resolutions { get; set; }
  104.         public Variants variants { get; set; }
  105.         public string id { get; set; }
  106.     }
  107.  
  108.     public class Preview
  109.     {
  110.         public List<Image> images { get; set; }
  111.         public bool enabled { get; set; }
  112.     }
  113.  
  114.     public class Oembed2
  115.     {
  116.         public string provider_url { get; set; }
  117.         public string version { get; set; }
  118.         public string title { get; set; }
  119.         public int thumbnail_width { get; set; }
  120.         public int height { get; set; }
  121.         public int width { get; set; }
  122.         public string html { get; set; }
  123.         public string author_name { get; set; }
  124.         public string provider_name { get; set; }
  125.         public string thumbnail_url { get; set; }
  126.         public string type { get; set; }
  127.         public int thumbnail_height { get; set; }
  128.         public string author_url { get; set; }
  129.     }
  130.  
  131.     public class Media
  132.     {
  133.         public Oembed2 oembed { get; set; }
  134.         public string type { get; set; }
  135.     }
  136.  
  137.     public class Data2
  138.     {
  139.         public bool contest_mode { get; set; }
  140.         public string subreddit_name_prefixed { get; set; }
  141.         public object banned_by { get; set; }
  142.         public MediaEmbed media_embed { get; set; }
  143.         public int? thumbnail_width { get; set; }
  144.         public string subreddit { get; set; }
  145.         public string selftext_html { get; set; }
  146.         public string selftext { get; set; }
  147.         public object likes { get; set; }
  148.         public string suggested_sort { get; set; }
  149.         public List<object> user_reports { get; set; }
  150.         public SecureMedia secure_media { get; set; }
  151.         public string link_flair_text { get; set; }
  152.         public string id { get; set; }
  153.         public object view_count { get; set; }
  154.         public SecureMediaEmbed secure_media_embed { get; set; }
  155.         public bool clicked { get; set; }
  156.         public object report_reasons { get; set; }
  157.         public string author { get; set; }
  158.         public bool saved { get; set; }
  159.         public List<object> mod_reports { get; set; }
  160.         public string name { get; set; }
  161.         public int score { get; set; }
  162.         public object approved_by { get; set; }
  163.         public bool over_18 { get; set; }
  164.         public string domain { get; set; }
  165.         public bool hidden { get; set; }
  166.         public Preview preview { get; set; }
  167.         public string thumbnail { get; set; }
  168.         public string subreddit_id { get; set; }
  169.         public object edited { get; set; }
  170.         public string link_flair_css_class { get; set; }
  171.         public string author_flair_css_class { get; set; }
  172.         public int gilded { get; set; }
  173.         public int downs { get; set; }
  174.         public bool brand_safe { get; set; }
  175.         public bool archived { get; set; }
  176.         public object removal_reason { get; set; }
  177.         public string post_hint { get; set; }
  178.         public bool can_gild { get; set; }
  179.         public int? thumbnail_height { get; set; }
  180.         public bool hide_score { get; set; }
  181.         public bool spoiler { get; set; }
  182.         public string permalink { get; set; }
  183.         public object num_reports { get; set; }
  184.         public bool locked { get; set; }
  185.         public bool stickied { get; set; }
  186.         public double created { get; set; }
  187.         public string url { get; set; }
  188.         public string author_flair_text { get; set; }
  189.         public bool quarantine { get; set; }
  190.         public string title { get; set; }
  191.  
  192.         [JsonIgnore]
  193.         public DateTime created_utc
  194.         {
  195.             get
  196.             {
  197.                 var unix = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
  198.                 return unix.AddSeconds(this.created_utcUNIX);
  199.             }
  200.             set
  201.             {
  202.                 var unix = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
  203.                 this.created_utcUNIX = Convert.ToInt64((value - unix).TotalSeconds);
  204.             }
  205.         }
  206.        
  207.         [JsonProperty("created_utc")]
  208.         public double created_utcUNIX { get; set; }
  209.         public object distinguished { get; set; }
  210.         public Media media { get; set; }
  211.         public int num_comments { get; set; }
  212.         public bool is_self { get; set; }
  213.         public bool visited { get; set; }
  214.         public string subreddit_type { get; set; }
  215.         public bool is_video { get; set; }
  216.         public int ups { get; set; }
  217.     }
  218.  
  219.     public class Child
  220.     {
  221.         public string kind { get; set; }
  222.         public Data2 data { get; set; }
  223.     }
  224.  
  225.     public class Data
  226.     {
  227.         public string modhash { get; set; }
  228.         public List<Child> children { get; set; }
  229.         public string after { get; set; }
  230.         public string before { get; set; }
  231.     }
  232.  
  233.     public class RootObject
  234.     {
  235.         public string kind { get; set; }
  236.         public Data data { get; set; }
  237.     }
Add Comment
Please, Sign In to add comment