Net::Gnip::ActivityStream - represent a stream of Gnip Activities
# Create a new stream my $stream = Net::Gnip::ActivityStream->new(); my $stream = Net::Gnip::ActivityStream->new(publisher => $publisher_name); # ... or parse from XML my $stream = Net::Gnip::ActivityStream->parse($xml); # set the activities $stream->activities(@activities); # get the activities my @activities = $stream->activities; # or use an iterator while (my $activity = $stream->next) { print $activity->uid; } $stream->reset; # ... now you can use it again while (my $activity = $stream->next) { print $activity->uid; }
Create a new, empty stream
Get or set the publisher name of this Activity Stream
Get or set the activities
To install Net::Gnip, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Gnip
CPAN shell
perl -MCPAN -e shell install Net::Gnip
For more information on module installation, please visit the detailed CPAN module installation guide.