![]() |
![]() |
![]() |
Twitter-GLib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
TwitterTimeline; TwitterTimelineClass; TwitterTimeline * twitter_timeline_new (void); TwitterTimeline * twitter_timeline_new_from_data (const gchar *buffer); gboolean twitter_timeline_load_from_data (TwitterTimeline *timeline, const gchar *buffer, GError **error); guint twitter_timeline_get_count (TwitterTimeline *timeline); TwitterStatus * twitter_timeline_get_id (TwitterTimeline *timeline, guint id); TwitterStatus * twitter_timeline_get_pos (TwitterTimeline *timeline, gint index_); GList * twitter_timeline_get_all (TwitterTimeline *timeline);
TwitterTimeline is a class that represents a list of Status messages coming from Twitter
typedef struct _TwitterTimeline TwitterTimeline;
The TwitterTimeline struct contains only private data and should only be accessed through the provided API
typedef struct { } TwitterTimelineClass;
The TwitterTimelineClass contains only private data
TwitterTimeline * twitter_timeline_new (void);
Creates a new, empty TwitterTimeline
Returns : |
the newly created TwitterTimeline. Use g_object_unref()
to free the resources it allocates
|
TwitterTimeline * twitter_timeline_new_from_data (const gchar *buffer);
Creates a new TwitterTimeline from its JSON representation
|
a NULL -terminated string containing the JSON description
of a timeline
|
Returns : |
the newly created TwitterTimeline. Use g_object_unref()
to free the resources it allocates
|
gboolean twitter_timeline_load_from_data (TwitterTimeline *timeline, const gchar *buffer, GError **error);
Updates timeline
from a JSON representation. All previous
content will be removed and disposed. On error, error
will
be set accordingly.
|
a TwitterTimeline |
|
a NULL -terminated string containing the JSON description
of a timeline
|
|
return location for a GError, or NULL
|
Returns : |
TRUE if buffer was successfully parsed, FALSE
otherwise
|
guint twitter_timeline_get_count (TwitterTimeline *timeline);
Retrieves the number of TwitterStatus instances inside timeline
|
a TwitterTimeline |
Returns : |
the number of statuses |
TwitterStatus * twitter_timeline_get_id (TwitterTimeline *timeline, guint id);
Retrieves the TwitterStatus with the given id
, if present
inside the timeline
|
a TwitterTimeline |
|
a status id |
Returns : |
a TwitterStatus or NULL
|
TwitterStatus * twitter_timeline_get_pos (TwitterTimeline *timeline, gint index_);
Retrieves the TwitterStatus at the given index_
|
a TwitterTimeline |
|
the position in the timeline |
Returns : |
a TwitterStatus |
GList * twitter_timeline_get_all (TwitterTimeline *timeline);
Retrieves all the TwitterStatus instances inside timeline
|
a TwitterTimeline |
Returns : |
a copy of the list of statuses. The TwitterStatus
instances inside the returned list are owned by the timeline
and should not be modified or freed. Use g_list_free() to free
the resources allocated by the list
|