public
Description: A Clutter-based Twitter client
Homepage: http://live.gnome.org/Tweet
Clone URL: git://github.com/ebassi/tweet.git
Remove the last stringified "since" parameter

Like for the user's timeline, the friends timeline should use a
timestamp for the "since_date" parameter.
Emmanuele Bassi (author)
Sat Jun 14 15:57:17 -0700 2008
commit  942e9713ce9369f0520ec5105177744f85ce68be
tree    bbf064cd23d83211d25c819270654409e2164053
parent  569c5331cf3c90fa38797fa9623c003a3878b0df
...
149
150
151
152
 
153
154
155
...
161
162
163
164
165
166
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
169
170
...
149
150
151
 
152
153
154
155
...
161
162
163
 
 
 
 
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
0
@@ -149,7 +149,7 @@ twitter_api_public_timeline (gint since_id)
0
 
0
 SoupMessage *
0
 twitter_api_friends_timeline (const gchar *user,
0
- const gchar *since)
0
+ gint64 since)
0
 {
0
   SoupMessage *msg;
0
   gchar *url;
0
@@ -161,10 +161,21 @@ twitter_api_friends_timeline (const gchar *user,
0
 
0
   msg = soup_message_new (SOUP_METHOD_GET, url);
0
 
0
- if (since && *since != '\0')
0
- soup_message_headers_append (msg->request_headers,
0
- "If-Modified-Since",
0
- since);
0
+ if (since > 0)
0
+ {
0
+ SoupDate *since_date;
0
+ gchar *date;
0
+
0
+ since_date = soup_date_new_from_time_t ((time_t) since);
0
+ date = soup_date_to_string (since_date, SOUP_DATE_HTTP);
0
+
0
+ soup_message_headers_append (msg->request_headers,
0
+ "If-Modified-Since",
0
+ date);
0
+
0
+ g_free (date);
0
+ soup_date_free (since_date);
0
+ }
0
 
0
   g_free (url);
0
 
...
26
27
28
29
 
30
31
32
...
26
27
28
 
29
30
31
32
0
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
0
 
0
 SoupMessage *twitter_api_public_timeline (gint since_id);
0
 SoupMessage *twitter_api_friends_timeline (const gchar *user,
0
- const gchar *since);
0
+ gint64 since);
0
 SoupMessage *twitter_api_user_timeline (const gchar *user,
0
                                              guint count,
0
                                              gint64 since);
...
823
824
825
826
 
827
828
829
...
823
824
825
 
826
827
828
829
0
@@ -823,7 +823,7 @@ twitter_client_get_public_timeline (TwitterClient *client,
0
 void
0
 twitter_client_get_friends_timeline (TwitterClient *client,
0
                                      const gchar *friend_,
0
- const gchar *since_date)
0
+ gint64 since_date)
0
 {
0
   GetTimelineClosure *clos;
0
   SoupMessage *msg;
...
135
136
137
138
 
139
140
141
...
135
136
137
 
138
139
140
141
0
@@ -135,7 +135,7 @@ void twitter_client_get_public_timeline (TwitterClient *client,
0
                                                     guint since_id);
0
 void twitter_client_get_friends_timeline (TwitterClient *client,
0
                                                     const gchar *friend_,
0
- const gchar *since_date);
0
+ gint64 since_date);
0
 void twitter_client_get_user_timeline (TwitterClient *client,
0
                                                     const gchar *user,
0
                                                     guint count,

Comments

    No one has commented yet.