aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter_lib.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2012-09-15 17:24:52 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2012-09-15 17:24:52 +0100
commitb61c74c0e0941577b551cf54d8965893090ca282 (patch)
tree096d21c2b75370ffa4e5a5af503c5191d1cd338c /protocols/twitter/twitter_lib.c
parentb3d99e347e66e1559b86e7d3bf78ed8b087ec947 (diff)
Merge Twitter favourite command from Flexo/#983. Leaving out the unfavourite
command for reasons given there. At this point there are loads of command and stuff is getting a little messy maybe.. :-/
Diffstat (limited to 'protocols/twitter/twitter_lib.c')
-rw-r--r--protocols/twitter/twitter_lib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index 01e8f538..f1483035 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -1082,3 +1082,15 @@ void twitter_report_spam(struct im_connection *ic, char *screen_name)
twitter_http(ic, TWITTER_REPORT_SPAM_URL, twitter_http_post,
ic, 1, args, 2);
}
+
+/**
+ * Favourite a tweet.
+ */
+void twitter_favourite_tweet(struct im_connection *ic, guint64 id)
+{
+ char *url;
+ url = g_strdup_printf("%s%llu%s", TWITTER_FAVORITE_CREATE_URL,
+ (unsigned long long) id, ".xml");
+ twitter_http(ic, url, twitter_http_post, ic, 1, NULL, 0);
+ g_free(url);
+}