• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

OpenTweenのfork


Commit MetaInfo

修訂aa91b0fbcfde0828fb25951f61a18e9b2e5795be (tree)
時間2012-02-22 19:47:44
作者Egtra <yusuke.ichinohe@gmai...>
CommiterKimura Youichi

Log Message

Port DataModel.vb to C#

Change Summary

差異

--- a/Tween/DataModel.vb
+++ /dev/null
@@ -1,414 +0,0 @@
1-' Tween - Client of Twitter
2-' Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
3-' (c) 2008-2011 Moz (@syo68k)
4-' (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
5-' (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
6-' (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
7-' All rights reserved.
8-'
9-' This file is part of Tween.
10-'
11-' This program is free software; you can redistribute it and/or modify it
12-' under the terms of the GNU General Public License as published by the Free
13-' Software Foundation; either version 3 of the License, or (at your option)
14-' any later version.
15-'
16-' This program is distributed in the hope that it will be useful, but
17-' WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18-' or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19-' for more details.
20-'
21-' You should have received a copy of the GNU General Public License along
22-' with this program. If not, see <http://www.gnu.org/licenses/>, or write to
23-' the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
24-' Boston, MA 02110-1301, USA.
25-
26-Imports System.Runtime.Serialization
27-
28-Public Class TwitterDataModel
29-
30- <DataContract()> _
31- Public Class Annotations
32- <DataMember(Name:="ConversationRole", IsRequired:=False)> Public ConversationRole As String
33- <DataMember(Name:="FromUser", IsRequired:=False)> Public FromUser As String
34- End Class
35-
36- <DataContract()> _
37- Public Class SizeElement
38- <DataMember(Name:="w")> Public w As Integer
39- <DataMember(Name:="h")> Public h As Integer
40- <DataMember(Name:="resize")> Public Resize As String
41- End Class
42-
43- <DataContract()> _
44- Public Class Sizes
45- <DataMember(Name:="large")> Public Large As SizeElement
46- <DataMember(Name:="medium")> Public Medium As SizeElement
47- <DataMember(Name:="small")> Public Small As SizeElement
48- <DataMember(Name:="thumb")> Public Thumb As SizeElement
49- End Class
50-
51- <DataContract()> _
52- Public Class Media
53- <DataMember(Name:="id")> Public Id As Long
54- <DataMember(Name:="media_url")> Public MediaUrl As String
55- <DataMember(Name:="media_url_https")> Public MediaUrlHttps As String
56- <DataMember(Name:="url")> Public Url As String
57- <DataMember(Name:="display_url")> Public DisplayUrl As String
58- <DataMember(Name:="expanded_url")> Public ExpandedUrl As String
59- <DataMember(Name:="sizes")> Public Sizes As Sizes
60- <DataMember(Name:="type")> Public Type As String
61- <DataMember(Name:="indices")> Public Indices(2) As Integer
62- End Class
63-
64- <DataContract()> _
65- Public Class Urls
66- <DataMember(Name:="url")> Public Url As String
67- <DataMember(Name:="display_url")> Public DisplayUrl As String
68- <DataMember(Name:="expanded_url")> Public ExpandedUrl As String
69- <DataMember(Name:="indices")> Public Indices(2) As Integer
70- End Class
71-
72- <DataContract()> _
73- Public Class Hashtags
74- <DataMember(Name:="indices")> Public Indices(2) As Integer
75- <DataMember(Name:="text")> Public Text As String
76- End Class
77-
78- <DataContract()> _
79- Public Class UserMentions
80- <DataMember(Name:="indices")> Public Indices(2) As Integer
81- <DataMember(Name:="screen_name")> Public ScreenName As String
82- <DataMember(Name:="name")> Public Name As String
83- <DataMember(Name:="id")> Public Id As Int64
84- End Class
85-
86- <DataContract()> _
87- Public Class Entities
88- <DataMember(Name:="urls")> Public Urls() As Urls
89- <DataMember(Name:="hashtags")> Public Hashtags() As Hashtags
90- <DataMember(Name:="user_mentions")> Public UserMentions() As UserMentions
91- <DataMember(Name:="media", isRequired:=False)> Public Media() As Media
92- End Class
93-
94- <DataContract()> _
95- Public Class User
96- <DataMember(Name:="statuses_count")> Public StatusesCount As Integer
97- <DataMember(Name:="profile_sidebar_fill_color")> Public ProfileSidebarFillColor As String
98- <DataMember(Name:="show_all_inline_media")> Public ShowAllInlineMedia As Boolean
99- <DataMember(Name:="profile_use_background_image")> Public ProfileUseBackgroundImage As Boolean
100- <DataMember(Name:="contributors_enabled")> Public ContributorsEnabled As Boolean
101- <DataMember(Name:="profile_sidebar_border_color")> Public ProfileSidebarBorderColor As String
102- <DataMember(Name:="location")> Public Location As String
103- <DataMember(Name:="geo_enabled")> Public GeoEnabled As Boolean
104- <DataMember(Name:="description")> Public Description As String
105- <DataMember(Name:="friends_count")> Public FriendsCount As Integer
106- <DataMember(Name:="verified")> Public Verified As Boolean
107- <DataMember(Name:="favourites_count")> Public FavouritesCount As Integer
108- <DataMember(Name:="created_at")> Public CreatedAt As String
109- <DataMember(Name:="profile_background_color")> Public ProfileBackgroundColor As String
110- <DataMember(Name:="follow_request_sent")> Public FollowRequestSent As String
111- <DataMember(Name:="time_zone")> Public TimeZone As String
112- <DataMember(Name:="followers_count")> Public FollowersCount As Integer
113- <DataMember(Name:="url")> Public Url As String
114- <DataMember(Name:="profile_image_url")> Public ProfileImageUrl As String
115- <DataMember(Name:="notifications")> Public Notifications As String
116- <DataMember(Name:="profile_text_color")> Public ProfileTextColor As String
117- <DataMember(Name:="protected")> Public [Protected] As Boolean
118- <DataMember(Name:="id_str")> Public IdStr As String
119- <DataMember(Name:="lang")> Public Lang As String
120- <DataMember(Name:="profile_background_image_url")> Public ProfileBackgroundImageUrl As String
121- <DataMember(Name:="screen_name")> Public ScreenName As String
122- <DataMember(Name:="name")> Public Name As String
123- <DataMember(Name:="following")> Public Following As String
124- <DataMember(Name:="profile_link_color")> Public ProfileLinkColor As String
125- <DataMember(Name:="id")> Public Id As Int64
126- <DataMember(Name:="listed_count")> Public ListedCount As Integer
127- <DataMember(Name:="profile_background_tile")> Public ProfileBackgroundTile As Boolean
128- <DataMember(Name:="utc_offset")> Public UtcOffset As String
129- <DataMember(Name:="place", IsRequired:=False)> Public Place As Place
130- <DataMember(Name:="status", IsRequired:=False)> Public Status As Status
131- End Class
132-
133- <DataContract()> _
134- Public Class Coordinates
135- <DataMember(Name:="type", IsRequired:=False)> Public Type As String
136- <DataMember(Name:="coordinates", IsRequired:=False)> Public Coordinates(2) As Double
137- End Class
138-
139- <DataContract()> _
140- Public Class Geo
141- <DataMember(Name:="type", IsRequired:=False)> Public Type As String
142- <DataMember(Name:="coordinates", IsRequired:=False)> Public Coordinates(2) As Double
143- End Class
144-
145- <DataContract()> _
146- Public Class BoundingBox
147- <DataMember(Name:="type", IsRequired:=False)> Public Type As String
148- <DataMember(Name:="coordinates", IsRequired:=False)> Public Coordinates As Double()()()
149- End Class
150-
151- <DataContract()> _
152- Public Class Attributes
153- <DataMember(Name:="street_address", IsRequired:=False)> Public StreetAddress As String
154- End Class
155-
156- <DataContract()> _
157- Public Class Place
158- <DataMember(Name:="url")> Public Url As String
159- <DataMember(Name:="bounding_box", IsRequired:=False)> Public BoundingBox As BoundingBox
160- <DataMember(Name:="street_address", IsRequired:=False)> Public StreetAddress As String
161- <DataMember(Name:="full_name")> Public FullName As String
162- <DataMember(Name:="name")> Public Name As String
163- '<DataMember(Name:="attributes", IsRequired:=False)> Public attributes As attributes
164- <DataMember(Name:="country_code", IsRequired:=False)> Public CountryCode As String
165- <DataMember(Name:="id")> Public Id As String
166- <DataMember(Name:="country")> Public Country As String
167- <DataMember(Name:="place_type")> Public PlaceType As String
168- End Class
169-
170- <DataContract()> _
171- Public Class RetweetedStatus
172- <DataMember(Name:="coordinates", IsRequired:=False)> Public Coordinates As Coordinates
173- <DataMember(Name:="geo", IsRequired:=False)> Public Geo As Geo
174- <DataMember(Name:="in_reply_to_user_id")> Public InReplyToUserId As String
175- <DataMember(Name:="source")> Public Source As String
176- <DataMember(Name:="user")> Public User As User
177- <DataMember(Name:="in_reply_to_screen_name")> Public InReplyToScreenName As String
178- <DataMember(Name:="created_at")> Public CreatedAt As String
179- <DataMember(Name:="contributors")> Public Contributors As Integer()
180- <DataMember(Name:="favorited")> Public Favorited As Boolean
181- <DataMember(Name:="truncated")> Public Truncated As Boolean
182- <DataMember(Name:="id")> Public Id As Int64
183- <DataMember(Name:="annotations", IsRequired:=False)> Public Annotations As Annotations
184- <DataMember(Name:="place", IsRequired:=False)> Public Place As Place
185- <DataMember(Name:="in_reply_to_status_id")> Public InReplyToStatusId As String
186- <DataMember(Name:="text")> Public Text As String
187- <DataMember(Name:="entities", isRequired:=False)> Public Entities As Entities
188- End Class
189-
190- <DataContract()> _
191- Public Class Status
192- <DataMember(Name:="in_reply_to_status_id_str")> Public InReplyToStatusIdStr As String
193- <DataMember(Name:="contributors", IsRequired:=False)> Public Contributors As Integer()
194- <DataMember(Name:="in_reply_to_screen_name")> Public InReplyToScreenName As String
195- <DataMember(Name:="in_reply_to_status_id")> Public InReplyToStatusId As String
196- <DataMember(Name:="in_reply_to_user_id_str")> Public InReplyToUserIdStr As String
197- <DataMember(Name:="retweet_count")> Public RetweetCount As String
198- <DataMember(Name:="created_at")> Public CreatedAt As String
199- <DataMember(Name:="geo", IsRequired:=False)> Public Geo As Geo
200- <DataMember(Name:="retweeted")> Public Retweeted As Boolean
201- <DataMember(Name:="in_reply_to_user_id")> Public InReplyToUserId As String
202- <DataMember(Name:="source")> Public Source As String
203- <DataMember(Name:="id_str")> Public IdStr As String
204- <DataMember(Name:="coordinates", IsRequired:=False)> Public Coordinates As Coordinates
205- <DataMember(Name:="truncated")> Public Truncated As Boolean
206- <DataMember(Name:="place", IsRequired:=False)> Public Place As Place
207- <DataMember(Name:="user")> Public User As User
208- <DataMember(Name:="retweeted_status", IsRequired:=False)> Public RetweetedStatus As RetweetedStatus
209- <DataMember(Name:="id")> Public Id As Int64
210- <DataMember(Name:="favorited")> Public Favorited As Boolean
211- <DataMember(Name:="text")> Public Text As String
212- <DataMember(Name:="entities", isRequired:=False)> Public Entities As Entities
213- End Class
214-
215- <DataContract()> _
216- Public Class TargetObject
217- Inherits Status
218- <DataMember(Name:="mode")> Public Mode As String
219- <DataMember(Name:="description")> Public Description As String
220- <DataMember(Name:="slug")> Public Slug As String
221- <DataMember(Name:="uri")> Public Uri As String
222- <DataMember(Name:="member_count")> Public MemberCount As Integer
223- <DataMember(Name:="full_name")> Public FullName As String
224- <DataMember(Name:="subscriber_count")> Public SubscriberCount As Integer
225- <DataMember(Name:="name")> Public Name As String
226- <DataMember(Name:="following")> Public Following As Boolean
227- End Class
228-
229- <DataContract()> _
230- Public Class Directmessage
231- <DataMember(Name:="created_at")> Public CreatedAt As String
232- <DataMember(Name:="sender_id")> Public SenderId As Int64
233- <DataMember(Name:="sender_screen_name")> Public SenderScreenName As String
234- <DataMember(Name:="sender")> Public Sender As User
235- <DataMember(Name:="id_str")> Public IdStr As String
236- <DataMember(Name:="recipient")> Public Recipient As User
237- <DataMember(Name:="recipient_screen_name")> Public RecipientScreenName As String
238- <DataMember(Name:="recipient_id")> Public RecipientId As Int64
239- <DataMember(Name:="id")> Public Id As Int64
240- <DataMember(Name:="text")> Public Text As String
241- <DataMember(Name:="entities", isRequired:=False)> Public Entities As Entities
242- End Class
243-
244- <DataContract()> _
245- Public Class Friendsevent
246- <DataMember(Name:="friends")> Public Friends As Int64()
247- End Class
248-
249- <DataContract()> _
250- Public Class DeletedStatusContent
251- <DataMember(Name:="id")> Public Id As Int64
252- <DataMember(Name:="user_id")> Public UserId As Int64
253- End Class
254-
255- <DataContract()> _
256- Public Class DeletedStatus
257- <DataMember(Name:="status")> Public Status As DeletedStatusContent
258- End Class
259-
260- <DataContract()> _
261- Public Class DeleteEvent
262- <DataMember(Name:="delete")> Public [Event] As DeletedStatus
263- End Class
264-
265- <DataContract()> _
266- Public Class DeletedDirectmessage
267- <DataMember(Name:="direct_message")> Public Directmessage As DeletedStatusContent
268- End Class
269-
270- <DataContract()> _
271- Public Class DeleteDirectmessageEvent
272- <DataMember(Name:="delete")> Public [Event] As DeletedDirectmessage
273- End Class
274- <DataContract()> _
275- Public Class DirectmessageEvent
276- <DataMember(Name:="direct_message")> Public Directmessage As Directmessage
277- End Class
278-
279- <DataContract()> _
280- Public Class TrackCount
281- <DataMember(Name:="track")> Public Track As Integer
282- End Class
283-
284- <DataContract()> _
285- Public Class LimitEvent
286- <DataMember(Name:="limit")> Public Limit As TrackCount
287- End Class
288-
289- <DataContract()> _
290- Public Class EventData
291- <DataMember(Name:="target")> Public Target As User
292- <DataMember(Name:="target_object", isRequired:=False)> Public TargetObject As TargetObject
293- <DataMember(Name:="created_at")> Public CreatedAt As String
294- <DataMember(Name:="event")> Public [Event] As String
295- <DataMember(Name:="source")> Public Source As User
296- End Class
297-
298- <DataContract()> _
299- Public Class RelatedTweet
300- <DataMember(Name:="annotations")> Public Annotations As Annotations
301- <DataMember(Name:="kind")> Public Kind As String
302- <DataMember(Name:="score")> Public Score As Double
303- <DataMember(Name:="value")> Public Status As Status
304- End Class
305-
306- <DataContract()> _
307- Public Class RelatedResult
308- <DataMember(Name:="annotations")> Public Annotations As Annotations
309- <DataMember(Name:="groupName")> Public GroupName As String
310- <DataMember(Name:="resultType")> Public ResultType As String
311- <DataMember(Name:="results")> Public Results As RelatedTweet()
312- <DataMember(Name:="score")> Public Score As Double
313- End Class
314-
315- <DataContract()> _
316- Public Class RelationshipResult
317- <DataMember(Name:="followed_by")> Public FollowedBy As Boolean
318- <DataMember(Name:="following")> Public Following As Boolean
319- End Class
320-
321- <DataContract()> _
322- Public Class RelationshipUsers
323- <DataMember(Name:="target")> Public Target As RelationshipResult
324- <DataMember(Name:="source")> Public Source As RelationshipResult
325- End Class
326-
327- <DataContract()> _
328- Public Class Relationship
329- <DataMember(Name:="relationship")> Public Relationship As RelationshipUsers
330- End Class
331-
332- <DataContract()> _
333- Public Class Ids
334- <DataMember(Name:="ids")> Public Id As Long()
335- <DataMember(Name:="next_cursor")> Public NextCursor As Long
336- <DataMember(Name:="previous_cursor")> Public PreviousCursor As Long
337- End Class
338-
339- <DataContract()> _
340- Public Class RateLimitStatus
341- <DataMember(Name:="reset_time_in_seconds")> Public RestTimeInSeconds As Integer
342- <DataMember(Name:="remaining_hits")> Public RemainingHits As Integer
343- <DataMember(Name:="reset_time")> Public RestTime As String
344- <DataMember(Name:="hourly_limit")> Public HourlyLimit As Integer
345- End Class
346-
347- <DataContract()> _
348- Public Class ListElementData
349- <DataMember(Name:="mode")> Public Mode As String
350- <DataMember(Name:="uri")> Public Uri As String
351- <DataMember(Name:="member_count")> Public MemberCount As Integer
352- <DataMember(Name:="slug")> Public Slug As String
353- <DataMember(Name:="full_name")> Public FullName As String
354- <DataMember(Name:="user")> Public User As User
355- <DataMember(Name:="following")> Public Following As Boolean
356- <DataMember(Name:="subscriber_count")> Public SubscriberCount As Integer
357- <DataMember(Name:="description")> Public Description As String
358- <DataMember(Name:="name")> Public Name As String
359- <DataMember(Name:="id")> Public Id As Long
360- End Class
361-
362- <DataContract()> _
363- Public Class Lists
364- <DataMember(Name:="lists")> Public Lists As ListElementData()
365- <DataMember(Name:="next_cursor")> Public NextCursor As Long
366- <DataMember(Name:="previous_cursor")> Public PreviousCursor As Long
367- End Class
368-
369- <DataContract()> _
370- Public Class Users
371- <DataMember(Name:="users")> Public users As User()
372- <DataMember(Name:="next_cursor")> Public NextCursor As Long
373- <DataMember(Name:="previous_cursor")> Public PreviousCursor As Long
374- End Class
375-
376- <DataContract()> _
377- Public Class ErrorResponse
378- <DataMember(Name:="request")> Public Request As String
379- <DataMember(Name:="error")> Public ErrMsg As String
380- End Class
381-
382- <DataContract()> _
383- Public Class SearchResult
384- <DataMember(Name:="statuses")> Public Statuses As List(Of Status)
385- <DataMember(Name:="next_page")> Public NextPage As String
386- <DataMember(Name:="error")> Public ErrMsg As String
387- End Class
388-
389- <DataContract()> _
390- Public Class PhotoSize
391- <DataMember(Name:="h")> Public Height As Integer
392- <DataMember(Name:="w")> Public Width As Integer
393- <DataMember(Name:="resize")> Public Resize As String
394- End Class
395-
396- <DataContract()> _
397- Public Class PhotoType
398- <DataMember(Name:="large")> Public LargeSize As PhotoSize
399- <DataMember(Name:="medium")> Public MediumSize As PhotoSize
400- <DataMember(Name:="small")> Public SmallSize As PhotoSize
401- <DataMember(Name:="thumb")> Public ThumbSize As PhotoSize
402- End Class
403-
404- <DataContract()> _
405- Public Class Configuration
406- <DataMember(Name:="characters_reserved_per_media")> Public CharactersReservedPerMedia As Integer = 20
407- <DataMember(Name:="photo_size_limit")> Public PhotoSizeLimit As Integer
408- <DataMember(Name:="photo_sizes")> Public PhotoSizes As PhotoType
409- <DataMember(Name:="non_username_paths")> Public NonUsernamePaths As String()
410- <DataMember(Name:="short_url_length")> Public ShortUrlLength As Integer = 19
411- <DataMember(Name:="short_url_length_https")> Public ShortUrlLengthHttps As Integer = 20
412- <DataMember(Name:="max_media_per_upload")> Public MaxMediaPerUpload As Integer
413- End Class
414-End Class
--- a/Tween/Tween.vbproj
+++ b/Tween/Tween.vbproj
@@ -149,7 +149,6 @@
149149 <Compile Include="Connection\TwitterPhoto.vb" />
150150 <Compile Include="Connection\TwitVideo.vb" />
151151 <Compile Include="Connection\yfrog.vb" />
152- <Compile Include="DataModel.vb" />
153152 <Compile Include="DetailsListView.vb">
154153 <SubType>Component</SubType>
155154 </Compile>
--- a/Tween/Twitter.vb
+++ b/Tween/Twitter.vb
@@ -963,8 +963,8 @@ Public Class Twitter
963963 Case HttpStatusCode.OK
964964 Try
965965 Dim relation = CreateDataFromJson(Of TwitterDataModel.Relationship)(content)
966- isFollowing = relation.Relationship.Source.Following
967- isFollowed = relation.Relationship.Source.FollowedBy
966+ isFollowing = relation.relationship.Source.Following
967+ isFollowed = relation.relationship.Source.FollowedBy
968968 Return ""
969969 Catch ex As SerializationException
970970 TraceOut(ex.Message + Environment.NewLine + content)
@@ -2713,7 +2713,7 @@ Public Class Twitter
27132713
27142714 Try
27152715 Dim lst = CreateDataFromJson(Of TwitterDataModel.Lists)(content)
2716- lists.AddRange(From le In lst.Lists Select New ListElement(le, Me))
2716+ lists.AddRange(From le In lst.lists Select New ListElement(le, Me))
27172717 cursor = lst.NextCursor
27182718 Catch ex As SerializationException
27192719 TraceOut(ex.Message + Environment.NewLine + content)
@@ -2747,7 +2747,7 @@ Public Class Twitter
27472747
27482748 Try
27492749 Dim lst = CreateDataFromJson(Of TwitterDataModel.Lists)(content)
2750- lists.AddRange(From le In lst.Lists Select New ListElement(le, Me))
2750+ lists.AddRange(From le In lst.lists Select New ListElement(le, Me))
27512751 cursor = lst.NextCursor
27522752 Catch ex As SerializationException
27532753 TraceOut(ex.Message + Environment.NewLine + content)
--- /dev/null
+++ b/TweenCS/DataModel.cs
@@ -0,0 +1,462 @@
1+// Tween - Client of Twitter
2+// Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
3+// (c) 2008-2011 Moz (@syo68k)
4+// (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
5+// (c) 2010-2011 anis774 (@anis774) <http://d.hatena.ne.jp/anis774/>
6+// (c) 2010-2011 fantasticswallow (@f_swallow) <http://twitter.com/f_swallow>
7+// (c) 2011 Egtra (@egtra) <http://dev.activebasic.com/egtra/>
8+// All rights reserved.
9+//
10+// This file is part of Tween.
11+//
12+// This program is free software; you can redistribute it and/or modify it
13+// under the terms of the GNU General Public License as published by the Free
14+// Software Foundation; either version 3 of the License, or (at your option)
15+// any later version.
16+//
17+// This program is distributed in the hope that it will be useful, but
18+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20+// for more details.
21+//
22+// You should have received a copy of the GNU General Public License along
23+// with this program. If not, see <http://www.gnu.org/licenses/>, or write to
24+// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
25+// Boston, MA 02110-1301, USA.
26+
27+using System;
28+using System.Runtime.Serialization;
29+using System.Collections.Generic;
30+
31+namespace Tween
32+{
33+ public class TwitterDataModel
34+ {
35+ [DataContract]
36+ public class Annotations
37+ {
38+ [DataMember(Name = "ConversationRole", IsRequired = false)] public string ConversationRole;
39+ [DataMember(Name = "FromUser", IsRequired = false)] public string FromUser;
40+ }
41+
42+ [DataContract]
43+ public class SizeElement
44+ {
45+ [DataMember(Name = "w")] public int w;
46+ [DataMember(Name = "h")] public int h;
47+ [DataMember(Name = "resize")] public string Resize;
48+ }
49+
50+ [DataContract]
51+ public class Sizes
52+ {
53+ [DataMember(Name = "large")] public SizeElement Large;
54+ [DataMember(Name = "medium")] public SizeElement Medium;
55+ [DataMember(Name = "small")] public SizeElement Small;
56+ [DataMember(Name = "thumb")] public SizeElement Thumb;
57+ }
58+
59+ [DataContract]
60+ public class Media
61+ {
62+ [DataMember(Name = "id")] public long Id;
63+ [DataMember(Name = "media_url")] public string MediaUrl;
64+ [DataMember(Name = "media_url_https")] public string MediaUrlHttps;
65+ [DataMember(Name = "url")] public string Url;
66+ [DataMember(Name = "display_url")] public string DisplayUrl;
67+ [DataMember(Name = "expanded_url")] public string ExpandedUrl;
68+ [DataMember(Name = "sizes")] public Sizes Sizes;
69+ [DataMember(Name = "type")] public string Type;
70+ [DataMember(Name = "indices")] public int[] Indices = new int[3];
71+ }
72+
73+ [DataContract]
74+ public class Urls
75+ {
76+ [DataMember(Name = "url")] public string Url;
77+ [DataMember(Name = "display_url")] public string DisplayUrl;
78+ [DataMember(Name = "expanded_url")] public string ExpandedUrl;
79+ [DataMember(Name = "indices")] public int[] Indices = new int[3];
80+ }
81+
82+ [DataContract]
83+ public class Hashtags
84+ {
85+ [DataMember(Name = "indices")] public int[] Indices = new int[3];
86+ [DataMember(Name = "text")] public string Text;
87+ }
88+
89+ [DataContract]
90+ public class UserMentions
91+ {
92+ [DataMember(Name = "indices")] public int[] Indices = new int[3];
93+ [DataMember(Name = "screen_name")] public string ScreenName;
94+ [DataMember(Name = "name")] public string Name;
95+ [DataMember(Name = "id")] public Int64 Id;
96+ }
97+
98+ [DataContract]
99+ public class Entities
100+ {
101+ [DataMember(Name = "urls")] public Urls[] Urls;
102+ [DataMember(Name = "hashtags")] public Hashtags[] Hashtags;
103+ [DataMember(Name = "user_mentions")] public UserMentions[] UserMentions;
104+ [DataMember(Name = "media", IsRequired = false)] public Media[] Media;
105+ }
106+
107+ [DataContract]
108+ public class User
109+ {
110+ [DataMember(Name = "statuses_count")] public int StatusesCount;
111+ [DataMember(Name = "profile_sidebar_fill_color")] public string ProfileSidebarFillColor;
112+ [DataMember(Name = "show_all_inline_media")] public bool ShowAllInlineMedia;
113+ [DataMember(Name = "profile_use_background_image")] public bool ProfileUseBackgroundImage;
114+ [DataMember(Name = "contributors_enabled")] public bool ContributorsEnabled;
115+ [DataMember(Name = "profile_sidebar_border_color")] public string ProfileSidebarBorderColor;
116+ [DataMember(Name = "location")] public string Location;
117+ [DataMember(Name = "geo_enabled")] public bool GeoEnabled;
118+ [DataMember(Name = "description")] public string Description;
119+ [DataMember(Name = "friends_count")] public int FriendsCount;
120+ [DataMember(Name = "verified")] public bool Verified;
121+ [DataMember(Name = "favourites_count")] public int FavouritesCount;
122+ [DataMember(Name = "created_at")] public string CreatedAt;
123+ [DataMember(Name = "profile_background_color")] public string ProfileBackgroundColor;
124+ [DataMember(Name = "follow_request_sent")] public string FollowRequestSent;
125+ [DataMember(Name = "time_zone")] public string TimeZone;
126+ [DataMember(Name = "followers_count")] public int FollowersCount;
127+ [DataMember(Name = "url")] public string Url;
128+ [DataMember(Name = "profile_image_url")] public string ProfileImageUrl;
129+ [DataMember(Name = "notifications")] public string Notifications;
130+ [DataMember(Name = "profile_text_color")] public string ProfileTextColor;
131+ [DataMember(Name = "protected")] public bool Protected;
132+ [DataMember(Name = "id_str")] public string IdStr;
133+ [DataMember(Name = "lang")] public string Lang;
134+ [DataMember(Name = "profile_background_image_url")] public string ProfileBackgroundImageUrl;
135+ [DataMember(Name = "screen_name")] public string ScreenName;
136+ [DataMember(Name = "name")] public string Name;
137+ [DataMember(Name = "following")] public string Following;
138+ [DataMember(Name = "profile_link_color")] public string ProfileLinkColor;
139+ [DataMember(Name = "id")] public Int64 Id;
140+ [DataMember(Name = "listed_count")] public int ListedCount;
141+ [DataMember(Name = "profile_background_tile")] public bool ProfileBackgroundTile;
142+ [DataMember(Name = "utc_offset")] public string UtcOffset;
143+ [DataMember(Name = "place", IsRequired = false)] public Place Place;
144+ [DataMember(Name = "status", IsRequired = false)] public Status Status;
145+ }
146+
147+ [DataContract]
148+ public class Coordinates
149+ {
150+ [DataMember(Name = "type", IsRequired = false)] public string Type;
151+ [DataMember(Name = "coordinates", IsRequired = false)] public double[] coordinates = new double[3];
152+ }
153+
154+ [DataContract]
155+ public class Geo
156+ {
157+ [DataMember(Name = "type", IsRequired = false)] public string Type;
158+ [DataMember(Name = "coordinates", IsRequired = false)] public double[] Coordinates = new double[3];
159+ }
160+
161+ [DataContract]
162+ public class BoundingBox
163+ {
164+ [DataMember(Name = "type", IsRequired = false)] public string Type;
165+ [DataMember(Name = "coordinates", IsRequired = false)] public double[][][] Coordinates;
166+ }
167+
168+ [DataContract]
169+ public class Attributes
170+ {
171+ [DataMember(Name = "street_address", IsRequired = false)] public string StreetAddress;
172+ }
173+
174+ [DataContract]
175+ public class Place
176+ {
177+ [DataMember(Name = "url")] public string Url;
178+ [DataMember(Name = "bounding_box", IsRequired = false)] public BoundingBox BoundingBox;
179+ [DataMember(Name = "street_address", IsRequired = false)] public string StreetAddress;
180+ [DataMember(Name = "full_name")] public string FullName;
181+ [DataMember(Name = "name")] public string Name;
182+ //[DataMember(Name = "attributes", IsRequired = false)] public attributes attributes;
183+ [DataMember(Name = "country_code", IsRequired = false)] public string CountryCode;
184+ [DataMember(Name = "id")] public string Id;
185+ [DataMember(Name = "country")] public string Country;
186+ [DataMember(Name = "place_type")] public string PlaceType;
187+ }
188+
189+ [DataContract]
190+ public class RetweetedStatus
191+ {
192+ [DataMember(Name = "coordinates", IsRequired = false)] public Coordinates Coordinates;
193+ [DataMember(Name = "geo", IsRequired = false)] public Geo Geo;
194+ [DataMember(Name = "in_reply_to_user_id")] public string InReplyToUserId;
195+ [DataMember(Name = "source")] public string Source;
196+ [DataMember(Name = "user")] public User User;
197+ [DataMember(Name = "in_reply_to_screen_name")] public string InReplyToScreenName;
198+ [DataMember(Name = "created_at")] public string CreatedAt;
199+ [DataMember(Name = "contributors")] public int[] Contributors;
200+ [DataMember(Name = "favorited")] public bool Favorited;
201+ [DataMember(Name = "truncated")] public bool Truncated;
202+ [DataMember(Name = "id")] public Int64 Id;
203+ [DataMember(Name = "annotations", IsRequired = false)] public Annotations Annotations;
204+ [DataMember(Name = "place", IsRequired = false)] public Place Place;
205+ [DataMember(Name = "in_reply_to_status_id")] public string InReplyToStatusId;
206+ [DataMember(Name = "text")] public string Text;
207+ [DataMember(Name = "entities", IsRequired = false)] public Entities Entities;
208+ }
209+
210+ [DataContract]
211+ public class Status
212+ {
213+ [DataMember(Name = "in_reply_to_status_id_str")] public string InReplyToStatusIdStr;
214+ [DataMember(Name = "contributors", IsRequired = false)] public int[] Contributors;
215+ [DataMember(Name = "in_reply_to_screen_name")] public string InReplyToScreenName;
216+ [DataMember(Name = "in_reply_to_status_id")] public string InReplyToStatusId;
217+ [DataMember(Name = "in_reply_to_user_id_str")] public string InReplyToUserIdStr;
218+ [DataMember(Name = "retweet_count")] public string RetweetCount;
219+ [DataMember(Name = "created_at")] public string CreatedAt;
220+ [DataMember(Name = "geo", IsRequired = false)] public Geo Geo;
221+ [DataMember(Name = "retweeted")] public bool Retweeted;
222+ [DataMember(Name = "in_reply_to_user_id")] public string InReplyToUserId;
223+ [DataMember(Name = "source")] public string Source;
224+ [DataMember(Name = "id_str")] public string IdStr;
225+ [DataMember(Name = "coordinates", IsRequired = false)] public Coordinates Coordinates;
226+ [DataMember(Name = "truncated")] public bool Truncated;
227+ [DataMember(Name = "place", IsRequired = false)] public Place Place;
228+ [DataMember(Name = "user")] public User User;
229+ [DataMember(Name = "retweeted_status", IsRequired = false)] public RetweetedStatus RetweetedStatus;
230+ [DataMember(Name = "id")] public Int64 Id;
231+ [DataMember(Name = "favorited")] public bool Favorited;
232+ [DataMember(Name = "text")] public string Text;
233+ [DataMember(Name = "entities", IsRequired = false)] public Entities Entities;
234+ }
235+
236+ [DataContract]
237+ public class TargetObject : Status
238+ {
239+ [DataMember(Name = "mode")] public string Mode;
240+ [DataMember(Name = "description")] public string Description;
241+ [DataMember(Name = "slug")] public string Slug;
242+ [DataMember(Name = "uri")] public string Uri;
243+ [DataMember(Name = "member_count")] public int MemberCount;
244+ [DataMember(Name = "full_name")] public string FullName;
245+ [DataMember(Name = "subscriber_count")] public int SubscriberCount;
246+ [DataMember(Name = "name")] public string Name;
247+ [DataMember(Name = "following")] public bool Following;
248+ }
249+
250+ [DataContract]
251+ public class Directmessage
252+ {
253+ [DataMember(Name = "created_at")] public string CreatedAt;
254+ [DataMember(Name = "sender_id")] public Int64 SenderId;
255+ [DataMember(Name = "sender_screen_name")] public string SenderScreenName;
256+ [DataMember(Name = "sender")] public User Sender;
257+ [DataMember(Name = "id_str")] public string IdStr;
258+ [DataMember(Name = "recipient")] public User Recipient;
259+ [DataMember(Name = "recipient_screen_name")] public string RecipientScreenName;
260+ [DataMember(Name = "recipient_id")] public Int64 RecipientId;
261+ [DataMember(Name = "id")] public Int64 Id;
262+ [DataMember(Name = "text")] public string Text;
263+ [DataMember(Name = "entities", IsRequired = false)] public Entities Entities;
264+ }
265+
266+ [DataContract]
267+ public class Friendsevent
268+ {
269+ [DataMember(Name = "friends")] public Int64[] Friends;
270+ }
271+
272+ [DataContract]
273+ public class DeletedStatusContent
274+ {
275+ [DataMember(Name = "id")] public Int64 Id;
276+ [DataMember(Name = "user_id")] public Int64 UserId;
277+ }
278+
279+ [DataContract]
280+ public class DeletedStatus
281+ {
282+ [DataMember(Name = "status")] public DeletedStatusContent Status;
283+ }
284+
285+ [DataContract]
286+ public class DeleteEvent
287+ {
288+ [DataMember(Name = "delete")] public DeletedStatus Event;
289+ }
290+
291+ [DataContract]
292+ public class DeletedDirectmessage
293+ {
294+ [DataMember(Name = "direct_message")] public DeletedStatusContent Directmessage;
295+ }
296+
297+ [DataContract]
298+ public class DeleteDirectmessageEvent
299+ {
300+ [DataMember(Name = "delete")] public DeletedDirectmessage Event;
301+ }
302+ [DataContract]
303+ public class DirectmessageEvent
304+ {
305+ [DataMember(Name = "direct_message")] public Directmessage Directmessage;
306+ }
307+
308+ [DataContract]
309+ public class TrackCount
310+ {
311+ [DataMember(Name = "track")] public int Track;
312+ }
313+
314+ [DataContract]
315+ public class LimitEvent
316+ {
317+ [DataMember(Name = "limit")] public TrackCount Limit;
318+ }
319+
320+ [DataContract]
321+ public class EventData
322+ {
323+ [DataMember(Name = "target")] public User Target;
324+ [DataMember(Name = "target_object", IsRequired = false)] public TargetObject TargetObject;
325+ [DataMember(Name = "created_at")] public string CreatedAt;
326+ [DataMember(Name = "event")] public string Event;
327+ [DataMember(Name = "source")] public User Source;
328+ }
329+
330+ [DataContract]
331+ public class RelatedTweet
332+ {
333+ [DataMember(Name = "annotations")] public Annotations Annotations;
334+ [DataMember(Name = "kind")] public string Kind;
335+ [DataMember(Name = "score")] public double Score;
336+ [DataMember(Name = "value")] public Status Status;
337+ }
338+
339+ [DataContract]
340+ public class RelatedResult
341+ {
342+ [DataMember(Name = "annotations")] public Annotations Annotations;
343+ [DataMember(Name = "groupName")] public string GroupName;
344+ [DataMember(Name = "resultType")] public string ResultType;
345+ [DataMember(Name = "results")] public RelatedTweet[] Results;
346+ [DataMember(Name = "score")] public double Score;
347+ }
348+
349+ [DataContract]
350+ public class RelationshipResult
351+ {
352+ [DataMember(Name = "followed_by")] public bool FollowedBy;
353+ [DataMember(Name = "following")] public bool Following;
354+ }
355+
356+ [DataContract]
357+ public class RelationshipUsers
358+ {
359+ [DataMember(Name = "target")] public RelationshipResult Target;
360+ [DataMember(Name = "source")] public RelationshipResult Source;
361+ }
362+
363+ [DataContract]
364+ public class Relationship
365+ {
366+ [DataMember(Name = "relationship")] public RelationshipUsers relationship;
367+ }
368+
369+ [DataContract]
370+ public class Ids
371+ {
372+ [DataMember(Name = "ids")] public long[] Id;
373+ [DataMember(Name = "next_cursor")] public long NextCursor;
374+ [DataMember(Name = "previous_cursor")] public long PreviousCursor;
375+ }
376+
377+ [DataContract]
378+ public class RateLimitStatus
379+ {
380+ [DataMember(Name = "reset_time_in_seconds")] public int RestTimeInSeconds;
381+ [DataMember(Name = "remaining_hits")] public int RemainingHits;
382+ [DataMember(Name = "reset_time")] public string RestTime;
383+ [DataMember(Name = "hourly_limit")] public int HourlyLimit;
384+ }
385+
386+ [DataContract]
387+ public class ListElementData
388+ {
389+ [DataMember(Name = "mode")] public string Mode;
390+ [DataMember(Name = "uri")] public string Uri;
391+ [DataMember(Name = "member_count")] public int MemberCount;
392+ [DataMember(Name = "slug")] public string Slug;
393+ [DataMember(Name = "full_name")] public string FullName;
394+ [DataMember(Name = "user")] public User User;
395+ [DataMember(Name = "following")] public bool Following;
396+ [DataMember(Name = "subscriber_count")] public int SubscriberCount;
397+ [DataMember(Name = "description")] public string Description;
398+ [DataMember(Name = "name")] public string Name;
399+ [DataMember(Name = "id")] public long Id;
400+ }
401+
402+ [DataContract]
403+ public class Lists
404+ {
405+ [DataMember(Name = "lists")] public ListElementData[] lists;
406+ [DataMember(Name = "next_cursor")] public long NextCursor;
407+ [DataMember(Name = "previous_cursor")] public long PreviousCursor;
408+ }
409+
410+ [DataContract]
411+ public class Users
412+ {
413+ [DataMember(Name = "users")] public User[] users;
414+ [DataMember(Name = "next_cursor")] public long NextCursor;
415+ [DataMember(Name = "previous_cursor")] public long PreviousCursor;
416+ }
417+
418+ [DataContract]
419+ public class ErrorResponse
420+ {
421+ [DataMember(Name = "request")] public string Request;
422+ [DataMember(Name = "error")] public string ErrMsg;
423+ }
424+
425+ [DataContract]
426+ public class SearchResult
427+ {
428+ [DataMember(Name = "statuses")] public List<Status> Statuses;
429+ [DataMember(Name = "next_page")] public string NextPage;
430+ [DataMember(Name = "error")] public string ErrMsg;
431+ }
432+
433+ [DataContract]
434+ public class PhotoSize
435+ {
436+ [DataMember(Name = "h")] public int Height;
437+ [DataMember(Name = "w")] public int Width;
438+ [DataMember(Name = "resize")] public string Resize;
439+ }
440+
441+ [DataContract]
442+ public class PhotoType
443+ {
444+ [DataMember(Name = "large")] public PhotoSize LargeSize;
445+ [DataMember(Name = "medium")] public PhotoSize MediumSize;
446+ [DataMember(Name = "small")] public PhotoSize SmallSize;
447+ [DataMember(Name = "thumb")] public PhotoSize ThumbSize;
448+ }
449+
450+ [DataContract]
451+ public class Configuration
452+ {
453+ [DataMember(Name = "characters_reserved_per_media")] public int CharactersReservedPerMedia = 20;
454+ [DataMember(Name = "photo_size_limit")] public int PhotoSizeLimit;
455+ [DataMember(Name = "photo_sizes")] public PhotoType PhotoSizes;
456+ [DataMember(Name = "non_username_paths")] public string[] NonUsernamePaths;
457+ [DataMember(Name = "short_url_length")] public int ShortUrlLength = 19;
458+ [DataMember(Name = "short_url_length_https")] public int ShortUrlLengthHttps = 20;
459+ [DataMember(Name = "max_media_per_upload")] public int MaxMediaPerUpload;
460+ }
461+ }
462+}
--- a/TweenCS/TweenCS.csproj
+++ b/TweenCS/TweenCS.csproj
@@ -48,6 +48,7 @@
4848 <Compile Include="ApiInformation.cs" />
4949 <Compile Include="Connection\IHttpConnection.cs" />
5050 <Compile Include="Connection\IMultimediaShareService.cs" />
51+ <Compile Include="DataModel.cs" />
5152 <Compile Include="MyCommon.cs" />
5253 <Compile Include="OpenURL.cs">
5354 <SubType>Form</SubType>