
Net::Gnip::Activity - a single item of activity in Gnip

# Create a new activity
# 'at' defaults to now
my $activity = Net::Gnip::Activity->new($action, $actor, %opts);
# ... or parse from xml
my $activity = Net::Gnip::Activity->parse($xml);
# at, uid and type are always present
print "At: ".$activity->at; # returns a DateTime objec
$activity->at(DateTime->now); # Can take a string or a DateTime
print "Actor: ".$activity->actor;
print "Action: ".$activity->action;
# These are optional
print "Url: ".$activity->url;
print "To: ".$activity->to."\n";
print "Regarding: ".$activity->regarding."\n";
print "Source: ".$activity->source."\n";
print "Tags: ".$activity->tags."\n";
my $payload = Net::Gnip::Activity::Payload->new($body);
$activity->payload($payload);
print $activity->as_xml;

Takes a action and a actor as mandatory parameters.
Options is a hash and can contain at, url, regarding, source and <tags>.
If at isn't passed in then the current time is used.
Returns the current at value.
Optionally takes either a string or a DateTime object to set the at time.
Gets or sets the current actor.
Gets or sets the current action.
Gets or sets the current url.
Gets or sets the current to.
Gets or sets the current regarding.
Gets or sets the current source.
Gets or sets the current tags.
The param either a list or comma separated string.
Returns a list.
Get or sets the current payload.
Parse some xml into an activity.
Return the activity as xml