using System;
using System.Collections.Generic;
using System.Text;

using Newtonsoft.Json;

namespace Chattr
{
    //{
    //"text":"RT @djkaz_com: Tweet\u306b\u5bfe\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u30fc\u3084\u30a2\u30d7\u30ea\u304b\u3089\"Reply\"\u3092\u3059\u308b\u3068\u3001Reply\u5143\u306e\u53c2\u7167\u60c5\u5831\u304c\u6b8b\u308b\u3002\u3053\u306e\u6642\u3001\u53c2\u7167\u5143\u306e\"\uff20\u30e6\u30fc\u30b6\u30fc\u540d\"\u306f\u672c\u6587\u4e2d\u3069\u3053\u306b\u3042\u3063\u3066\u3082\u3001\u53c2\u7167\u60c5\u5831\u304c\u6b8b\u308a\u3001\u901a\u5e38\u306eReply\u3068\u540c\u3058\u306b\u6271\u308f\u308c\u308b\u3002\u3068\u3044\u3046\u4ed5\u69d8\u3092\u4f7f\u3046\u3068\u3001RT\u30b3\u30e1\u30f3\u30c8\u3067\u3082Rep ...",
    //"created_at":"Sun Jan 09 01:51:26 +0000 2011",
    //"truncated":true,
    //"id_str":"23919744193134592",
    //"favorited":false,
    //"source":"\u003Ca href=\"http:\/\/afficheur.sourceforge.jp\" rel=\"nofollow\"\u003EAfficheur for Mac\u003C\/a\u003E",
    //"in_reply_to_status_id_str":null,
    //"geo":null,
    //"entities":{
    //	"hashtags":[],
    //	"urls":[],
    //	"user_mentions":[
    //		{
    //			"screen_name":"djkaz_com",
    //			"indices":[3,13],
    //			"id_str":"51974184",
    //			"name":"DJ-Kaz.com",
    //			"id":51974184
    //			}
    //		]
    //	},
    //"contributors":null,
    //"retweet_count":1,
    //"in_reply_to_screen_name":null,
    //"in_reply_to_status_id":null,
    //"in_reply_to_user_id_str":null,
    //"place":null,
    //"retweeted_status":{
    //	"text":"Tweet\u306b\u5bfe\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u30fc\u3084\u30a2\u30d7\u30ea\u304b\u3089\"Reply\"\u3092\u3059\u308b\u3068\u3001Reply\u5143\u306e\u53c2\u7167\u60c5\u5831\u304c\u6b8b\u308b\u3002\u3053\u306e\u6642\u3001\u53c2\u7167\u5143\u306e\"\uff20\u30e6\u30fc\u30b6\u30fc\u540d\"\u306f\u672c\u6587\u4e2d\u3069\u3053\u306b\u3042\u3063\u3066\u3082\u3001\u53c2\u7167\u60c5\u5831\u304c\u6b8b\u308a\u3001\u901a\u5e38\u306eReply\u3068\u540c\u3058\u306b\u6271\u308f\u308c\u308b\u3002\u3068\u3044\u3046\u4ed5\u69d8\u3092\u4f7f\u3046\u3068\u3001RT\u30b3\u30e1\u30f3\u30c8\u3067\u3082Reply\u540c\u69d8\u306b\u306a\u308b\u3002",
    //	"created_at":"Sun Jan 09 01:48:24 +0000 2011",
    //	"truncated":false,
    //	"id_str":"23918980720754688",
    //	"favorited":false,
    //	"source":"\u003Ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003EEchofon\u003C\/a\u003E",
    //	"in_reply_to_status_id_str":null,
    //	"geo":null,
    //	"entities":{
    //		"hashtags":[],
    //		"urls":[],
    //		"user_mentions":[]
    //		},
    //	"contributors":null,
    //	"retweet_count":1,
    //	"in_reply_to_screen_name":null,
    //	"in_reply_to_status_id":null,
    //	"in_reply_to_user_id_str":null,
    //	"place":null,
    //	"retweeted":false,
    //	"user":{
    //		"url":"http:\/\/dj-kaz.com\/",
    //		"screen_name":"djkaz_com",
    //		"contributors_enabled":false,
    //		"created_at":"Mon Jun 29 05:44:54 +0000 2009",
    //		"profile_link_color":"0084B4",
    //		"is_translator":false,
    //		"profile_sidebar_border_color":"C0DEED",
    //		"id_str":"51974184",
    //		"verified":false,
    //		"description":"Born and grown up in Nagoya, Japan.  Spent College life in Ontario, Canada",
    //		"lang":"en",
    //		"profile_use_background_image":true,
    //		"show_all_inline_media":false,
    //		"follow_request_sent":null,
    //		"following":null,
    //		"geo_enabled":true,
    //		"profile_background_color":"C0DEED",
    //		"notifications":null,
    //		"profile_background_image_url":"http:\/\/a3.twimg.com\/a\/1294279085\/images\/themes\/theme1\/bg.png",
    //		"followers_count":272,
    //		"protected":false,
    //		"location":"Tokyo, Japan",
    //		"profile_text_color":"333333",
    //		"name":"DJ-Kaz.com",
    //		"listed_count":20,
    //		"favourites_count":102,
    //		"profile_sidebar_fill_color":"DDEEF6",
    //		"profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1209003437\/4e1651be-b4d4-494c-8fdf-d0603c7a8888_normal.png",
    //		"id":51974184,
    //		"statuses_count":13674,
    //		"profile_background_tile":false,
    //		"time_zone":"Osaka",
    //		"utc_offset":32400,
    //		"friends_count":266
    //		},
    //	"id":23918980720754688,
    //	"coordinates":null,
    //	"in_reply_to_user_id":null
    //	},
    //"retweeted":false,
    //"user":{
    //	"url":"http:\/\/bit.ly\/boubkZ",
    //	"screen_name":"t_mimizuk",
    //	"contributors_enabled":false,
    //	"created_at":"Sat Jul 04 11:42:26 +0000 2009",
    //	"profile_link_color":"0084B4",
    //	"is_translator":false,
    //	"profile_sidebar_border_color":"BDDCAD",
    //	"id_str":"53652434",
    //	"verified":false,
    //	"description":"\u56fd\u5883\u7121\u304d\u732b\u3082\u3075\u56e3\u30fb\u9577\u671f\u5931\u696d\u6c42\u8077\u4e2d\u30fb\u306d\u3053\u597d\u304d\u30fb\u97f3\u697d\u96d1\u98df\u30fb\u30cb\u30b3\u30f3\u30fb\u30e9\u30a4\u30ab\u30fb\u9280\u5869\u30d5\u30a3\u30eb\u30e0\u30ab\u30e1\u30e9\u3067\u6563\u6b69\u5199\u771f\uff1a\r\nLooking for a Job... Love cats, music, film photography, Nikon, Leica, etc.",
    //	"lang":"ja",
    //	"profile_use_background_image":false,
    //	"show_all_inline_media":false,
    //	"follow_request_sent":null,
    //	"following":null,
    //	"geo_enabled":false,
    //	"profile_background_color":"9AE4E8",
    //	"notifications":null,
    //	"profile_background_image_url":"http:\/\/a3.twimg.com\/a\/1294279085\/images\/themes\/theme1\/bg.png",
    //	"followers_count":304,
    //	"protected":false,
    //	"location":"Tokyo, Japan",
    //	"profile_text_color":"333333",
    //	"name":"MIMIZUK",
    //	"listed_count":37,
    //	"favourites_count":49,
    //	"profile_sidebar_fill_color":"DDFFCC",
    //	"profile_image_url":"http:\/\/a1.twimg.com\/profile_images\/1198497353\/twiicon2_normal.png",
    //	"id":53652434,
    //	"statuses_count":6201,
    //	"profile_background_tile":false,
    //	"time_zone":"Tokyo",
    //	"utc_offset":32400,
    //	"friends_count":285
    //	},
    //"id":23919744193134592,
    //"coordinates":null,
    //"in_reply_to_user_id":null
    //}
    [JsonObject(MemberSerialization.OptIn)]
    public class TwitterJsonUser
    {
        [JsonProperty]
        public string id_str { get; set; }
        [JsonProperty]
        public string screen_name { get; set; }
        [JsonProperty]
        public string name { get; set; }
        [JsonProperty]
        public string profile_image_url { get; set; }
        [JsonProperty]
        public string location { get; set; }
        [JsonProperty]
        public bool verified { get; set; }
        [JsonProperty]
        public bool Protected { get; set; }
    }

    [JsonObject(MemberSerialization.OptIn)]
    public class TwitterJsonTweet
    {
        [JsonProperty]
        public string id_str { get; set; }
        [JsonProperty]
        public string text { get; set; }
        [JsonProperty]
        public string created_at { get; set; }
        [JsonProperty]
        public string source { get; set; }
        [JsonProperty]
        public string in_reply_to_status_id_str { get; set; }
        [JsonProperty]
        public string in_reply_to_user_id_str { get; set; }
        [JsonProperty]
        public string in_reply_to_screen_name { get; set; }
        [JsonProperty]
        public TwitterJsonUser user { get; set; }
    }

    [JsonObject(MemberSerialization.OptIn)]
    public class TwitterJsonReTweet : TwitterJsonTweet
    {
        [JsonProperty]
        public TwitterJsonTweet retweeted_status { get; set; }
    }

    //{
    //"direct_message":{
    //	"sender":{
    //		"contributors_enabled":false,
    //		"profile_sidebar_border_color":"87bc44",
    //		"id_str":"6933102",
    //		"lang":"en",
    //		"created_at":"Tue Jun 19 15:10:18 +0000 2007",
    //		"description":"",
    //		"follow_request_sent":false,
    //		"verified":false,
    //		"profile_use_background_image":true,
    //		"url":null,
    //		"profile_background_color":"9ae4e8",
    //		"is_translator":false,
    //		"show_all_inline_media":false,
    //		"following":false,
    //		"geo_enabled":false,
    //		"notifications":false,
    //		"profile_background_image_url":"http:\/\/a3.twimg.com\/a\/1292975674\/images\/themes\/theme1\/bg.png",
    //		"profile_image_url":"http:\/\/a1.twimg.com\/a\/1292975674\/images\/default_profile_1_normal.png",
    //		"location":"Tokyo,JAPAN",
    //		"favourites_count":3,
    //		"listed_count":0,
    //		"profile_text_color":"000000",
    //		"followers_count":2,
    //		"screen_name":"k_ichi_2000",
    //		"profile_sidebar_fill_color":"e0ff92",
    //		"protected":true,
    //		"profile_background_tile":false,
    //		"time_zone":"Tokyo",
    //		"friends_count":3,
    //		"name":"\u01ddsou\u0131\u0265\u0254\u0131 o\u029e\u0131\u0265ns\u0287\u0250\u029e",
    //		"statuses_count":276,
    //		"id":6933102,
    //		"utc_offset":32400,
    //		"profile_link_color":"0000ff"
    //		},
    //	"text":"DM Test 2",
    //	"created_at":"Sun Jan 09 10:56:29 +0000 2011",
    //	"id_str":"2165377167",
    //	"sender_screen_name":"k_ichi_2000",
    //	"recipient":{
    //		"contributors_enabled":false,
    //		"profile_sidebar_border_color":"C0DEED",
    //		"id_str":"229561667",
    //		"lang":"ja",
    //		"created_at":"Wed Dec 22 18:37:08 +0000 2010",
    //		"description":"\u30d5\u30a9\u30ed\u30fc\u3001\u30d6\u30ed\u30c3\u30af\u306f\u304a\u6c17\u8efd\u306b",
    //		"follow_request_sent":false,
    //		"verified":false,
    //		"profile_use_background_image":true,
    //		"url":"http:\/\/ichi.mo-blog.jp\/",
    //		"profile_background_color":"C0DEED",
    //		"is_translator":false,
    //		"show_all_inline_media":false,
    //		"following":true,
    //		"geo_enabled":false,
    //		"notifications":false,
    //		"profile_background_image_url":"http:\/\/a3.twimg.com\/a\/1292975674\/images\/themes\/theme1\/bg.png",
    //		"profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1203967103\/miimage-100x100_normal.jpg",
    //		"location":"Tokyo, JAPAN",
    //		"favourites_count":5,
    //		"listed_count":3,
    //		"profile_text_color":"333333",
    //		"followers_count":150,
    //		"screen_name":"kichi2007",
    //		"profile_sidebar_fill_color":"DDEEF6",
    //		"protected":false,
    //		"profile_background_tile":false,
    //		"time_zone":"Tokyo",
    //		"friends_count":400,
    //		"name":"\uff79\uff70\u30fb\uff72\uff81",
    //		"statuses_count":75,
    //		"id":229561667,
    //		"utc_offset":32400,
    //		"profile_link_color":"0084B4"
    //		},
    //	"recipient_screen_name":"kichi2007",
    //	"sender_id":6933102,
    //	"recipient_id":229561667,
    //	"id":2165377167
    //	}
    //}
    class TwitterJsonDM
    {
        [JsonProperty]
        public string id_str { get; set; }
        [JsonProperty]
        public string text { get; set; }
        [JsonProperty]
        public string created_at { get; set; }
        [JsonProperty]
        public string sender_screen_name { get; set; }
        [JsonProperty]
        public string recipient_screen_name { get; set; }
        [JsonProperty]
        public TwitterJsonUser sender { get; set; }
        [JsonProperty]
        public TwitterJsonUser recipient { get; set; }
    }

    class TwitterJsonDirectMessage
    {
        [JsonProperty]
        public TwitterJsonDM direct_message { get; set; }
    }

    //{"delete":{"status":{"user_id_str":"6933102","id_str":"24136746350415872","id":24136746350415872,"user_id":6933102}}}
    class TwitterJsonStatus
    {
        [JsonProperty]
        public string user_id_str { get; set; }
        [JsonProperty]
        public string id_str { get; set; }
        [JsonProperty]
        public string id { get; set; }
        [JsonProperty]
        public string user_id { get; set; }
    }
    class TwitterJsonStatusDelete
    {
        [JsonProperty]
        public TwitterJsonStatus status { get; set; }
    }

    class TwitterJsonDeleteStatus
    {
        [JsonProperty]
        public TwitterJsonStatusDelete delete { get; set; }
    }
}
