Activity

## Activity Activity — Activity on notes and comments |

## Synopsis

                        flickcurl_activity;
                        flickcurl_activity_event;
    flickcurl_activity ** flickcurl_activity_userComments   (flickcurl *fc,
                                                             int per_page,
                                                             int page);
    flickcurl_activity ** flickcurl_activity_userPhotos     (flickcurl *fc,
                                                             const char *timeframe,
                                                             int per_page,
                                                             int page);
    void                flickcurl_free_activities           (flickcurl_activity **activities_object);

## Description

Activity on notes and comments

## Details

### flickcurl_activity

    typedef struct {
      char *type; /* photoset or photo */
      char *owner;
      char *owner_name;
      char *primary;

      /* photo info: ID/secret/server/farm */
      char *id;
      char *secret;
      int server;
      int farm;

      /* counts */
      int comments_old;
      int comments_new;
      int notes_old;
      int notes_new;
      int views;
      int comments;
      int photos;
      int faves;

      /* flags */
      int more;
      char* title;

      /* Array of events on this item */
      flickcurl_activity_event* events[FLICKCURL_MAX_ACTIVITY_EVENTS+1];
    } flickcurl_activity;

Comments or photos item with activity

char *`type`; | activity type photoset or photo
char *`owner`; | owner NSID
char *`owner_name`; | owner name
char *`primary`; | primary
char *`id`; | photo id
char *`secret`; | photo secret
int `server`; | photo server
int `farm`; | photo farm
int `comments_old`; | old comments count
int `comments_new`; | new comments count
int `notes_old`; | old notes count
int `notes_new`; | new notes count
int `views`; | views count
int `comments`; | comments count
int `photos`; | photos count
int `faves`; | favourites count
int `more`; | more boolean flag
char *`title`; | title of acitivty
flickcurl_activity_event *`events`[FLICKCURL_MAX_ACTIVITY_EVENTS+1]; | array of events associated with this actiivty

### flickcurl_activity_event

    typedef struct {
      char *type; /* comment or note */
      char *id;
      char *user;
      char *username;
      char *value;
      int date_added;
    } flickcurl_activity_event;

Comment or photo activity event

char *`type`; | activty event type
char *`id`; | ID
char *`user`; | user ID
char *`username`; | user name
char *`value`; | event value
int `date_added`; | date added

### flickcurl_activity_userComments ()

    flickcurl_activity ** flickcurl_activity_userComments   (flickcurl *fc,
                                                             int per_page,
                                                             int page);

Returns a list of recent activity on photos commented on by the calling user.

Implements flickr.activity.userComments (1.0)

`fc` : | flickcurl context
`per_page` : | Number of items to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50.
`page` : | The page of results to return. If this argument is omitted, it defaults to 1.
Returns : | non-0 on failure

### flickcurl_activity_userPhotos ()

    flickcurl_activity ** flickcurl_activity_userPhotos     (flickcurl *fc,
                                                             const char *timeframe,
                                                             int per_page,
                                                             int page);

Returns a list of recent activity on photos belonging to the calling user. Do not poll this method more than once an hour.

Implements flickr.activity.userPhotos (1.0)

`fc` : | flickcurl context
`timeframe` : | The timeframe in which to return updates for. This can be specified in days (`'2d'`) or hours (`'4h'`). The default behavoir is to return changes since the beginning of the previous user session. (or NULL)
`per_page` : | Number of items to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50. (or NULL)
`page` : | The page of results to return. If this argument is omitted, it defaults to 1. (or NULL)
Returns : | non-0 on failure

### flickcurl_free_activities ()

    void                flickcurl_free_activities           (flickcurl_activity **activities_object);

Destructor for array of activity objects

`activities_object` : | activity object array