TwitterTimeline

TwitterTimeline — A class representing a collection of Statuses

Synopsis

                    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);

Object Hierarchy

  GObject
   +----TwitterTimeline

Description

TwitterTimeline is a class that represents a list of Status messages coming from Twitter

Details

TwitterTimeline

typedef struct _TwitterTimeline TwitterTimeline;

The TwitterTimeline struct contains only private data and should only be accessed through the provided API


TwitterTimelineClass

typedef struct {
} TwitterTimelineClass;

The TwitterTimelineClass contains only private data


twitter_timeline_new ()

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

twitter_timeline_new_from_data ()

TwitterTimeline *   twitter_timeline_new_from_data      (const gchar *buffer);

Creates a new TwitterTimeline from its JSON representation

buffer :

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

twitter_timeline_load_from_data ()

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.

timeline :

a TwitterTimeline

buffer :

a NULL-terminated string containing the JSON description of a timeline

error :

return location for a GError, or NULL

Returns :

TRUE if buffer was successfully parsed, FALSE otherwise

twitter_timeline_get_count ()

guint               twitter_timeline_get_count          (TwitterTimeline *timeline);

Retrieves the number of TwitterStatus instances inside timeline

timeline :

a TwitterTimeline

Returns :

the number of statuses

twitter_timeline_get_id ()

TwitterStatus *     twitter_timeline_get_id             (TwitterTimeline *timeline,
                                                         guint id);

Retrieves the TwitterStatus with the given id, if present inside the timeline

timeline :

a TwitterTimeline

id :

a status id

Returns :

a TwitterStatus or NULL

twitter_timeline_get_pos ()

TwitterStatus *     twitter_timeline_get_pos            (TwitterTimeline *timeline,
                                                         gint index_);

Retrieves the TwitterStatus at the given index_

timeline :

a TwitterTimeline

index_ :

the position in the timeline

Returns :

a TwitterStatus

twitter_timeline_get_all ()

GList *             twitter_timeline_get_all            (TwitterTimeline *timeline);

Retrieves all the TwitterStatus instances inside timeline

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