forked from swhitley/TwitterStreamClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus.cs
66 lines (63 loc) · 1.82 KB
/
status.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Runtime.Serialization;
using System.Globalization;
namespace TwitterStreamClient
{
//<status>
//<created_at>Tue Apr 07 22:52:51 +0000 2009</created_at>
//<id>1472669360</id>
//<text>At least I can get your humor through tweets. RT @abdur: I don't mean this in a bad way, but genetically speaking your a cul-de-sac.</text>
//<source><a href="http://www.tweetdeck.com/">TweetDeck</a></source>
//<truncated>false</truncated>
//<in_reply_to_status_id></in_reply_to_status_id>
//<in_reply_to_user_id></in_reply_to_user_id>
//<favorited>false</favorited>
//<in_reply_to_screen_name></in_reply_to_screen_name>
//<geo/>
//<contributors/>
//</status>
[DataContract]
public class status
{
public DateTimeOffset created_at_dt;
[DataMember]
public string created_at
{
get { return created_at_dt.ToString("ddd MMM dd HH:mm:ss zzz yyyy"); }
set
{
created_at_dt = DateTimeOffset.ParseExact(value, "ddd MMM dd HH:mm:ss zzz yyyy", CultureInfo.InvariantCulture);
}
}
[DataMember]
public string id;
[DataMember]
public string text;
[DataMember]
public string source;
[DataMember]
public string truncated;
[DataMember]
public string in_reply_to_status_id;
[DataMember]
public string in_reply_to_user_id;
[DataMember]
public string favorited;
[DataMember]
public string in_reply_to_screen_name;
[DataMember]
public user user;
[DataMember]
public geo geo;
[DataMember]
public string contributors;
}
[DataContract]
public class geo
{
[DataMember]
public string type;
[DataMember]
public string[] coordinates;
}
}