TwitterUser

TwitterUser — A class representing a single user

Synopsis

                    TwitterUser;
                    TwitterUserClass;
TwitterUser *       twitter_user_new                    (void);
TwitterUser *       twitter_user_new_from_data          (const gchar *buffer);
gboolean            twitter_user_load_from_data         (TwitterUser *user,
                                                         const gchar *buffer,
                                                         GError **error);
const gchar *       twitter_user_get_name               (TwitterUser *user);
const gchar *       twitter_user_get_url                (TwitterUser *user);
const gchar *       twitter_user_get_description        (TwitterUser *user);
const gchar *       twitter_user_get_location           (TwitterUser *user);
const gchar *       twitter_user_get_screen_name        (TwitterUser *user);
const gchar *       twitter_user_get_profile_image_url  (TwitterUser *user);
guint               twitter_user_get_id                 (TwitterUser *user);
gboolean            twitter_user_get_protected          (TwitterUser *user);
TwitterStatus *     twitter_user_get_status             (TwitterUser *user);
gboolean            twitter_user_get_following          (TwitterUser *user);
guint               twitter_user_get_friends_count      (TwitterUser *user);
guint               twitter_user_get_statuses_count     (TwitterUser *user);
guint               twitter_user_get_followers_count    (TwitterUser *user);
guint               twitter_user_get_favorites_count    (TwitterUser *user);
const gchar *       twitter_user_get_created_at         (TwitterUser *user);
const gchar *       twitter_user_get_time_zone          (TwitterUser *user);
gint                twitter_user_get_utc_offset         (TwitterUser *user);
GdkPixbuf *         twitter_user_get_profile_image      (TwitterUser *user);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----TwitterUser

Properties

  "created-at"               gchar*                : Read
  "description"              gchar*                : Read
  "favorites-count"          guint                 : Read
  "followers-count"          guint                 : Read
  "following"                gboolean              : Read
  "friends-count"            guint                 : Read
  "id"                       guint                 : Read
  "location"                 gchar*                : Read
  "name"                     gchar*                : Read
  "profile-image-url"        gchar*                : Read
  "protected"                gboolean              : Read
  "screen-name"              gchar*                : Read
  "status"                   TwitterStatus*        : Read
  "statuses-count"           guint                 : Read
  "time-zone"                gchar*                : Read
  "url"                      gchar*                : Read
  "utc-offset"               gint                  : Read

Signals

  "changed"                                        : Run Last

Description

TwitterUser is a class that represents a user coming from Twitter.

TwitterUser instances should be created by parsing a JSON description coming from Twitter. Some parts of the user data, like the GdkPixbuf of the user's icon, might be lazily loaded to avoid blocking; once the asynchronous loading has ended, the "changed" signal is emitted.

Details

TwitterUser

typedef struct _TwitterUser TwitterUser;

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


TwitterUserClass

typedef struct {
  void (* changed) (TwitterUser *user);
} TwitterUserClass;

The TwitterUserClass struct contains only private data

changed ()

class handler for the "changed" signal

twitter_user_new ()

TwitterUser *       twitter_user_new                    (void);

Returns :


twitter_user_new_from_data ()

TwitterUser *       twitter_user_new_from_data          (const gchar *buffer);

buffer :

Returns :


twitter_user_load_from_data ()

gboolean            twitter_user_load_from_data         (TwitterUser *user,
                                                         const gchar *buffer,
                                                         GError **error);

user :

buffer :

error :

Returns :


twitter_user_get_name ()

const gchar *       twitter_user_get_name               (TwitterUser *user);

user :

Returns :


twitter_user_get_url ()

const gchar *       twitter_user_get_url                (TwitterUser *user);

user :

Returns :


twitter_user_get_description ()

const gchar *       twitter_user_get_description        (TwitterUser *user);

user :

Returns :


twitter_user_get_location ()

const gchar *       twitter_user_get_location           (TwitterUser *user);

user :

Returns :


twitter_user_get_screen_name ()

const gchar *       twitter_user_get_screen_name        (TwitterUser *user);

user :

Returns :


twitter_user_get_profile_image_url ()

const gchar *       twitter_user_get_profile_image_url  (TwitterUser *user);

user :

Returns :


twitter_user_get_id ()

guint               twitter_user_get_id                 (TwitterUser *user);

user :

Returns :


twitter_user_get_protected ()

gboolean            twitter_user_get_protected          (TwitterUser *user);

user :

Returns :


twitter_user_get_status ()

TwitterStatus *     twitter_user_get_status             (TwitterUser *user);

user :

Returns :


twitter_user_get_following ()

gboolean            twitter_user_get_following          (TwitterUser *user);

user :

Returns :


twitter_user_get_friends_count ()

guint               twitter_user_get_friends_count      (TwitterUser *user);

user :

Returns :


twitter_user_get_statuses_count ()

guint               twitter_user_get_statuses_count     (TwitterUser *user);

user :

Returns :


twitter_user_get_followers_count ()

guint               twitter_user_get_followers_count    (TwitterUser *user);

user :

Returns :


twitter_user_get_favorites_count ()

guint               twitter_user_get_favorites_count    (TwitterUser *user);

user :

Returns :


twitter_user_get_created_at ()

const gchar *       twitter_user_get_created_at         (TwitterUser *user);

user :

Returns :


twitter_user_get_time_zone ()

const gchar *       twitter_user_get_time_zone          (TwitterUser *user);

user :

Returns :


twitter_user_get_utc_offset ()

gint                twitter_user_get_utc_offset         (TwitterUser *user);

user :

Returns :


twitter_user_get_profile_image ()

GdkPixbuf *         twitter_user_get_profile_image      (TwitterUser *user);

user :

Returns :

Property Details

The "created-at" property

  "created-at"               gchar*                : Read

The date the user profile was created.

Default value: NULL


The "description" property

  "description"              gchar*                : Read

The description of the user.

Default value: NULL


The "favorites-count" property

  "favorites-count"          guint                 : Read

The number of favorite statues the user has.

Default value: 0


The "followers-count" property

  "followers-count"          guint                 : Read

The number of followers the user has.

Default value: 0


The "following" property

  "following"                gboolean              : Read

Whether we are following the user.

Default value: FALSE


The "friends-count" property

  "friends-count"            guint                 : Read

The number of friends the user has.

Default value: 0


The "id" property

  "id"                       guint                 : Read

The unique id of the user.

Default value: 0


The "location" property

  "location"                 gchar*                : Read

The location of the user.

Default value: NULL


The "name" property

  "name"                     gchar*                : Read

The name of the user.

Default value: NULL


The "profile-image-url" property

  "profile-image-url"        gchar*                : Read

The URL of the profile image of the user.

Default value: NULL


The "protected" property

  "protected"                gboolean              : Read

Whether the user entries are protected.

Default value: FALSE


The "screen-name" property

  "screen-name"              gchar*                : Read

The screen name of the user.

Default value: NULL


The "status" property

  "status"                   TwitterStatus*        : Read

The user status.


The "statuses-count" property

  "statuses-count"           guint                 : Read

The number of statuses the user wrote.

Default value: 0


The "time-zone" property

  "time-zone"                gchar*                : Read

The name of the time zone of the user.

Default value: NULL


The "url" property

  "url"                      gchar*                : Read

The URL of the user.

Default value: NULL


The "utc-offset" property

  "utc-offset"               gint                  : Read

The offset of the time zone of the user from UTC.

Default value: 0

Signal Details

The "changed" signal

void                user_function                      (TwitterUser *user,
                                                        gpointer     user_data)      : Run Last

The ::changed signal is emitted each time the TwitterUser changes after an asynchronous operation.

user :

the TwitterUser that emitted the signal

user_data :

user data set when the signal handler was connected.