Simon Wistow > Net-Gnip-0.3 > Net::Gnip::ActivityStream

Download:
Net-Gnip-0.3.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Net::Gnip::ActivityStream - represent a stream of Gnip Activities

SYNOPIS ^

    # 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;
    }

METHODS ^

new

Create a new, empty stream

publisher [publisher name]

Get or set the publisher name of this Activity Stream

activities [activity[s]]

Get or set the activities

syntax highlighting: