| Twitter-GLib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define TWITTER_ERROR enum TwitterError; TwitterError twitter_error_from_status (guint status); gchar * twitter_http_date_from_time_t (time_t time_); gchar * twitter_http_date_from_delta (gint seconds); time_t twitter_http_date_to_time_t (const gchar *date); gint twitter_http_date_to_delta (const gchar *date); gboolean twitter_date_to_time_val (const gchar *date, GTimeVal *time_);
typedef enum {
TWITTER_ERROR_HOST_NOT_FOUND,
TWITTER_ERROR_CANCELLED,
TWITTER_ERROR_PERMISSION_DENIED,
TWITTER_ERROR_NOT_FOUND,
TWITTER_ERROR_TIMED_OUT,
TWITTER_ERROR_FAILED,
TWITTER_ERROR_NOT_MODIFIED,
TWITTER_ERROR_PARSE_ERROR
} TwitterError;
Twitter error enumeration.
| Host not found | |
| Cancelled | |
| Permission denied | |
| Operation not found | |
| Operation timed out | |
| Operation failed | |
| The result of the operation hasn't been modified since the last query | |
| Unable to parse the JSON data coming from the provider |
TwitterError twitter_error_from_status (guint status);
Converts an HTTP status code coming from Libsoup into a TwitterError
|
a Libsoup HTTP status code |
Returns : |
a TwitterError |
gchar * twitter_http_date_from_time_t (time_t time_);
Converts a Unix time into an HTTP date
|
timestamp, expressed in seconds from the epoch |
Returns : |
a newly allocated string containing the
HTTP date. Use g_free() when done
|
gchar * twitter_http_date_from_delta (gint seconds);
Creates an HTTP representation of a timestamp seconds from now
|
seconds from now |
Returns : |
a newly allocated string containing the
HTTP date. Use g_free() when done
|
time_t twitter_http_date_to_time_t (const gchar *date);
Converts a timestamp in HTTP format into a Unix timestamp
|
a HTTP date string |
Returns : |
the Unix timestamp equivalent to the HTTP one |
gint twitter_http_date_to_delta (const gchar *date);
Converts a timestamp in HTTP into seconds from the current time
|
a HTTP date string |
Returns : |
seconds from the current time |
gboolean twitter_date_to_time_val (const gchar *date, GTimeVal *time_);
Converts a Twitter date into a GTimeVal. The timestamp is relative to UTC.
|
a timestamp coming from Twitter |
|
return location for a GTimeVal |
Returns : |
TRUE if the conversion was successful
|