forked from pedrofranceschi/twitterc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwitter_api.h
32 lines (28 loc) · 988 Bytes
/
twitter_api.h
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
#include <json/json.h>
#include <time.h>
// #include "http_connection.h"
#include "twitter_api_oauth.h"
typedef struct {
char *name;
char *screen_name;
char *id_str;
} TwitterUser;
typedef struct {
char *text;
char *id_str;
TwitterUser *author;
time_t created_at;
struct Tweet *next_tweet, *previous_tweet;
} Tweet;
char *_relative_time(time_t past_time);
char *_html_escape_string(char *string);
void TwitterUser_free(TwitterUser *user);
void Tweet_free(Tweet *tweet, int free_related_tweets_too);
int TwitterAPI_search(char *search_term, Tweet **first_search_result);
int TwitterAPI_home_timeline(Tweet **first_tweet);
int TwitterAPI_mentions_timeline(Tweet **first_tweet);
int TwitterAPI_user_timeline(Tweet **first_tweet, TwitterUser *user);
int TwitterAPI_statuses_update(char *text, Tweet *in_reply_to_tweet);
int TwitterAPI_statuses_destroy(Tweet *statuses);
int TwitterAPI_get_retweets(Tweet *tweet, Tweet **first_tweet);
int TwitterAPI_statuses_retweet(Tweet *tweet);