static const char *twitter_friends_url = "https://twitter.com/statuses/friends_timeline.xml";
static const char *twitter_replies_url = "http://twitter.com/statuses/replies.xml";
-static const char *identica_user_url = "http://identi.ca/api/statuses/user_timeline/";
-static const char *identica_update_url = "http://identi.ca/api/statuses/update.xml";
-static const char *identica_public_url = "http://identi.ca/api/statuses/public_timeline.xml";
-static const char *identica_friends_url = "http://identi.ca/api/statuses/friends_timeline.xml";
-static const char *identica_replies_url = "http://identi.ca/api/statuses/replies.xml";
+static const char *identica_user_url = "https://identi.ca/api/statuses/user_timeline/";
+static const char *identica_update_url = "https://identi.ca/api/statuses/update.xml";
+static const char *identica_public_url = "https://identi.ca/api/statuses/public_timeline.xml";
+static const char *identica_friends_url = "https://identi.ca/api/statuses/friends_timeline.xml";
+static const char *identica_replies_url = "https://identi.ca/api/statuses/replies.xml";
static CURL *curl_init(void)
{
{
xmlChar *text = NULL;
xmlChar *user = NULL;
+ xmlChar *created = NULL;
xmlNodePtr userinfo;
current = current->xmlChildrenNode;
while (current != NULL) {
if (current->type == XML_ELEMENT_NODE) {
+ if (!xmlStrcmp(current->name, (const xmlChar *)"created_at"))
+ created = xmlNodeListGetString(doc, current->xmlChildrenNode, 1);
if (!xmlStrcmp(current->name, (const xmlChar *)"text"))
text = xmlNodeListGetString(doc, current->xmlChildrenNode, 1);
if (!xmlStrcmp(current->name, (const xmlChar *)"user")) {
userinfo = userinfo->next;
}
}
- if (user && text) {
- printf("[%s] %s\n", user, text);
+
+ if (user && text && created) {
+ printf("[%s] (%.16s) %s\n",
+ user, created, text);
xmlFree(user);
xmlFree(text);
+ xmlFree(created);
user = NULL;
text = NULL;
+ created = NULL;
}
}
current = current->next;